FW: Array problem

From: Date: Mon, 19 Nov 2001 09:46:46 +0000
Subject: FW: Array problem
Groups: php.general 
Request: Send a blank email to php-general+get-75081@lists.php.net to get a copy of this message
> Hi there.I just want to know if the following code is suppose to work or > not? > I thing it must work! > Is there something wrong with my while() funtion or must i use other > functions? > > $query = "SELECT co_id FROM employee ORDER BY co_id"; > db_connect($query); > while($row=db_range()){ > list($co_id) = $row ; > $id[$i] = "$co_id" ; > echo "<br>$id[$i]"; // This works > $i++ ; > }//end while 1 > > $j = 0; > > while($id[$j]){ > echo "<br>$id[$i]"; // Doesnt wanna work. WHY ??? > $j++; > }

« previous php.general (#75081) next »