pixelead0 / tmdb_v3-PHP-API-

Wrapper in PHP for The Movie Data Base version 3
119 stars 81 forks source link

how to get crew and cast picture in infomovie.php #50

Closed lyarinet closed 6 years ago

lyarinet commented 7 years ago

Best API Hello Sir please need sum help to get picture for persons how to get crew and cast picture in infomovie.php

bogdanfinn commented 7 years ago

After https://github.com/pixelead0/tmdb_v3-PHP-API-/pull/49 is accepted you can get the crew and cast picture the way it is described in the infoPerson.php Exmaple file.

By now you can access the crew and cast data from a movie with my comment in: https://github.com/pixelead0/tmdb_v3-PHP-API-/issues/48

When you iterating over the crew or the cast data you can access the picture by accessing the correct array key. For example: ` $castArray = $movie->get('credits')['cast'];

foreach($castArray as $castData){ $picturePath = $castData['profile_path']; } `

lyarinet commented 7 years ago

Thanks For replay create a example file please

lyarinet commented 7 years ago

Thanks I Do it but u make the all fix in example files for new users

bogdanfinn commented 7 years ago

Sorry i do not understand what you want :-(

lyarinet commented 7 years ago

$movie->get('credits')['cast'] $movie->get('credits')['crew']

$castArray = $movie->get('credits')['cast'];

foreach($castArray as $castData){ $picturePath = $castData['profile_path']; }

the all classes files

bogdanfinn commented 7 years ago

I think you should wait for the Pull Request. Then it would be all clear.

This code sample i described is only a current workaround for accessing the data you want. After the PR it will be more easy to access the data.

bogdanfinn commented 6 years ago

@pixelead0 Issue could be closed, because of the mentioned PR