Closed contempoinc closed 7 years ago
Got everything working, just having an issue spitting out the results within a foreach probably overthinking it for example. Any help is much appreciated!
if(!empty($results)) {
echo '<ul class="marB20 places-nearby">';
$i = 0;
foreach($results as $result){
echo '<li>';
echo $result[$i]->name;
echo $result[$i]->rating;
echo '</li>';
$i++;
}
echo '</ul>';
}
Got it figured out, here's the completed function/foreach example for anyone else out there:
https://gist.github.com/contempoinc/f360871a7be751db190ab40617b2ed73
First awesome work! Do you have a quick example of a foreach to loop through the results?