note 13392 deleted from function.mysql-fetch-array by betz

From: Date: Wed, 05 Oct 2005 11:33:39 +0000
Subject: note 13392 deleted from function.mysql-fetch-array by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-96429@lists.php.net to get a copy of this message
Note Submitter: jpeterso at moody dot edu ---- The code above is great to write the variable's one time and refer to them when you need to then loop through the next item. In a controled environment, I used this code in a for loop to create columns. You still need to put it in a loop for multiple items. $ary = mysql_fetch_assoc($query_variable); if(is_array($ary)){ while (list($key,$val) = each($ary)) { $$key = $val; } } else { break 1; } I continuely got errors without the else break clause. This breaks me out of my for loop. Hope it helps.

« previous php.notes (#96429) next »