Here's a snippit of code I am working with:
while(($response = $responses->fetchObject()) || ($mapping = $mappings->fetchObject())) {
$mapping = $mapping ? array('data' => array('#type'=>'link','#title' =>$mapping->title, '#href' => 'node/' . $mapping->nid)) : '';
$response = $response ? array('data' => array('#type'=>'link','#title' =>$response->title, '#href' => 'node/' . $response->nid)) : '';
}
Because PHP does short circuit evaluation, $mapping doesn't get assigned anything if $response does.
How can I write this so that both $response and $mapping are assigned something in the while loop?