For exemple to print the first element could we do like this:
Code: Select all
$result = mysql_query( "SELECT username FROM users" );
$row = mysql_fetch_array($result);
print $rowї1];Moderator: General Moderators
Code: Select all
$result = mysql_query( "SELECT username FROM users" );
$row = mysql_fetch_array($result);
print $rowї1];Code: Select all
$query = "SELECT * FROM somewhere";
$result = mysql_query($query) or die (mysql_error());
$array1 = mysql_fetch_array($result, MYSQL_ASSOC);
// do something here with first recordset
// now gather second recordset
while ($array2 = mysql_fetch_assoc($result))
{
// notice the parethesis
// puit what you want to do with each record here
// for eg echo $array2['something']
}