PHP for getting an array of data in the express_entry_list
Permalink
I need help:( I created 2 express data objects: States and People. Under States, I have a one attribute - State Name and under People, I have Person’s Name, Bio, Photo. Only one State can have a person, but a person can have my states associated to a person. So I made an association one person -> many states and many states -> one person.
How do I output an array of states (separated by a comma) in my php template?
How do I output an array of states (separated by a comma) in my php template?
<div class="row">
<div class="col-sm-4">
<?php
$personPhoto = $item->getEntry()->getPersonPhoto();
if (is_object($personPhoto)) { ?>
<img src="<?php echo $personPhoto->getRelativePath(); ?>">
<?php } ?>
</div>
<div class="col-sm-8">
<h1><?=$item->getEntry()->getPersonName();?></h1>
<p><?=$item->getEntry()->getPersonBio();?></p>
<p>States: ??</p>
</div>
</div>