var references

From: Date: Fri, 06 Feb 2004 17:46:16 +0000
Subject: var references
Groups: php.general 
Request: Send a blank email to php-general+get-177033@lists.php.net to get a copy of this message
I have the following: <?php include('../../../db2.php'); $blat = $tue_5a; $result = mysql_query("SELECT * FROM classes WHERE c_d_tue='1' AND c_s_tue_1_hr='5' AND c_s_tue_1_dn='am'"); while($row = mysql_fetch_array($result)) { switch($blat) { case tue_5a: $min_1 = $row[29]; break; } ?> class title:<br><input type="text" value="<? echo "$row[c_title]"; ?>"></input><br> class minute:<br><input type="text" value="<? echo "$min_1"; ?>"></input><br> class description:<br><textarea><? echo "$row[c_desc]"; ?></textarea><br> <? } ?> Why can I not refence the row[29] from min_1? ive tried various ways and nothing shows up unless i actually put the assoc array value. Any ideas? It should display "50".

« previous php.general (#177033) next »