php - Failed to iterate over selected rows -


the code supposed row @ each loop , build td elements each data piece. however, gets rows while missing others though rows selected:

$query = "select * category"; $ret = mysql_query($query, $conn); while ($rows = mysql_fetch_assoc($ret)) {   echo "<tr>";   foreach ($rows $val) {     echo "<td>{$val}</td>";   } } 

mysql_fetch_assoc returns associative array. display each returned row, (taken directly php.net page mysql_fetch_assoc

while ($row = mysql_fetch_assoc($result)) { echo $row["userid"]; echo $row["fullname"]; echo $row["userstatus"]; 

}


Comments

Popular posts from this blog

javascript - Bootstrap Popover: iOS Safari strange behaviour -

Magento/PHP - Get phones on all members in a customer group -

session - Logging Out Using PHP -