Multi dimensional array
Posted: Thu Feb 27, 2003 7:21 am
Hi all,
I am trying to add elements to a multi dimensional array but get a syntax error on the line with array_push()... can anyone help?
John M
Here is the problem code:
I am trying to add elements to a multi dimensional array but get a syntax error on the line with array_push()... can anyone help?
John M
Here is the problem code:
Code: Select all
<?php
$x=0;
$gauge_array = array();
foreach($material_array as $target)
{
$sql="select gauge,mat_name
from gauge_info
where mat_name ='".$target."'
and loc_code='00'";
$qry=ifx_query($sql,$dbid);
while( $row=ifx_fetch_row($qry,"NEXT"))
{
array_push($gauge_array,$row['mat_name']=>$row['gauge']);
echo $gauge_array[$x]."<br>\n";
$x++;
}
ifx_free_result($qry);
}
?>