I should say first of all I'm not a PHP guy, so if anyone can help with this, I'll do my best to understand any suggestions.
I have the following code that accesses an API and outputs some of the data, via PHP wrapper:
$idMovie=11;
$pelinfo = $tmdb_V3->movieDetail($idMovie);
<h1><?php echo $pelinfo[original_title]; ?></h1>
<h2><?php echo $pelinfo[release_date]; ?></h2>
<img src="<?php echo $pelinfo[poster_path]; ?>">
<p><?php echo $pelinfo[overview]; ?></p>
This works fine, it shows the data for one item. What I need to do though is show the data for many more items. So far I've just repeated the block and changed the $idMovie variable - but this is of course, is not the way to do it.
I think I need to do this:
Set up an array to hold each variable, so $idMovie[12,34,56,78]
Create a loop to go through each variable, and output the data using my code block above.
If anyone can point me in the right right direction, that would be most helpful.
Thanks Dave