Hi ya all,
I'm getting a weird output. First I'll give you the code, then I'll give you the output.
$arrResult = array( (Parent),(MenuName) );
// Put fetched data into a managable array
while ($row = mysql_fetch_assoc($result))
{
$arrResult[$i]['Parent']= $row['_Parent'];
$arrResult[$i]['MenuName']= $row['MenuName'];
echo '<b>From SQL DB:</b> '.$row['MenuName'].' <b>From PHP Array:</b> '.$arrResult[$i]['MenuName'].'<br>';
$i++;
}
The output I get is:
From SQL DB: Accessories From PHP Array: A
From SQL DB: Case From PHP Array: C
From SQL DB: CD/DVD From PHP Array:CD/DVD
From SQL DB: CPU From PHP Array: CPU
From SQL DB: Hard Drive From PHP Array: Hard Drive
So.... how on earth does position 0 and 1 in my array only contain 'A' and 'C' ??????? 😕