while ($rs =mysql_fetch_array ($result))
1, ask this cycle, do not need to move the record pointer. Can we loop through the records?
2, $rs =mysql_fetch_array ($result) Does this expression return true, or is it equivalent to true if $rs has a value.
Thank you..
------Solution--------------------
If $rs has always been true, is that the cycle of death? , so when you get the array, the value of $rs is true, and when the array is read, the $rs is empty, which is false. I'm a novice, I understand.
------Solution--------------------
Mysql_fetch_array () is an extended version of Mysql_fetch_row ().
Mysql_fetch_row () Gets a row of data from the result set associated with the specified result identity and returns it as an array. Each result column is stored in an array of cells, with an offset starting at 0. Calling Mysql_fetch_row () in turn returns the next row in the result set, or FALSE if there are no more rows.
------Solution--------------------
Explore
The expression has a value, you can think of it as true, right?
------Solution--------------------
Of course, if there is a value then the array is returned, and the array is quite true.
------Solution--------------------
Characters with BOOL can be converted,
With two!! Number can be converted to bool (TRUE)
PHP Code