So I've got a bit of code that grabs stuff from a database and does some parsing. Take a look:
$children = mysql_query($query) or die ("Unable to find children of node: ".mysql_error());
if(mysql_num_rows($children) > 0) {
echo ("<children>");
while($child = mysql_fetch_row($children)); {
echo ("id= ".$child);
process_node($child);
}
echo ("</children>");
}
The problem I'm running into is that when $child is passed to process_node (which is, incidentally, the name of the function that holds the code you're looking at,) it has no value. I know that results are getting returned 'cause I've echoed the result of mysql_num_rows. It just seems like for some reason $child isn't getting set - I've tried adding a print_r($child) and that doesn't even show up on the page, and the echo ("id=... is just blank.
Can anyone see what I'm missing here? Thanks in advance for your help.