Forum Moderators: coopster

Message Too Old, No Replies

Change $row['date'] to $date

         

mooger35

5:32 pm on Sep 8, 2006 (gmt 0)

10+ Year Member



When writing the code to display the mysql_fetch_assoc results I'd like to remove the $row[''] portion and just leave it as a variable like this: $date, $numid, $text and on and on. For the life of me I can't remember how to do it... even though I know I looked at this last week sometime.

EDIT:
//nevermind. Stupid extract.

:-)

StupidScript

5:46 pm on Sep 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



while($row=mysql_fetch_assoc($handle)) {

$id=$row["id"];

$date=$row["date"];

...

}

[edited by: StupidScript at 5:47 pm (utc) on Sep. 8, 2006]

mooger35

6:08 pm on Sep 8, 2006 (gmt 0)

10+ Year Member



Thanks. But extract($row) was what I was looking for.

StupidScript

6:47 pm on Sep 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Cool. Ya learn something new every day ... :)