 <p>You probably will have to do something like this:</p> <pre><code>$featureList = array(); foreach(Petition::getFeaturedPetitions() as $petition) { $featureList[$petition-&gt;id] = 'before '.$petition-&gt;call_to_action.'petition'; } </code></pre>