Reversing Elements In An Array
Posted: Thu Oct 10, 2002 8:18 pm
i am making an aim subprofile script to set the mood for you, and an trying to get the array to output all the people's screen names in reverse table order because i want the most recent users (the one's most recently) added to the table to be displayed
Currently it is outputing the screen names in table order.
Here is my table setup
id INT(3) NOT NULL auto_increment,
sn MEDIUMTEXT,
dateofv MEDIUMTEXT,
hits INT(5) DEFAULT 1,
PRIMARY KEY(id)
Code: Select all
$sql = mysql_query("SELECT * FROM userinfo");
while ($row = mysql_fetch_assoc($sql)) {
$whoviewed = $rowї'sn'];
echo $whoviewed . "<br>";
}Here is my table setup
id INT(3) NOT NULL auto_increment,
sn MEDIUMTEXT,
dateofv MEDIUMTEXT,
hits INT(5) DEFAULT 1,
PRIMARY KEY(id)