I am very new to PHP and hope you can help me with this.
I am fetching some data from SQL and try to create an array that I want to echo on a page.
When I
You cant just echo arrays.
You have to loop through it with a foreach for example:
$c = "";
$i = 0;
$arr = array();
$output = ''
foreach ($objNames->names as $names) {
$c = " " . $names->member . " ";
array_push($arr, $c);
$i++;
}
if($i != 0) {
$output = $arr;
}
foreach($output as $row) {
?>
This should work for you!