Array() gets printed php and not the contents code example
Example 1: php echo array
<?php
$a = array ('a' => 'apple', 'b' => 'banana', 'c' => array ('x', 'y', 'z'));
print_r ($a);
?>
Example 2: php echo array
foreach($results as $result) {
echo $result . '<br>';
}