using a for loop but it is not working how come
| From: | Richard Kurth | Date: | Fri, 06 Jun 2003 04:42:06 +0000 |
| Subject: | using a for loop but it is not working how come | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-150448@lists.php.net to get a copy of this message | ||
I am having a problem with this script It pulls a list of numbers from
one field in the database (the numbers are in this format
(275,277,278,276) It needs to pull each number and run it through the
function dofunction and then move on to the next one in tell there are
no more to process. What am I doing wrong or is there a better way to
do this.
sql="Select Numbers from dom where name = '$name'";
$results=safe_query($sql);
$DBRow = mysql_fetch_array($results);
$numbers = $DBRow["Numbers"];
$numbers = array($numbers);
for($i = 0; $i < count($numbers); $i++){
$number = $numbers[$i];
dofunction($number);
}
--
Best regards,
Richard mailto:rdkurth@starband.net