output all items in array into variable php code example Example: php echo array foreach($results as $result) { echo $result . '<br>'; }