Hi i was wondering if theres another way of using this:
$result=mysql_query("SELECT * FROM users");
while ($row=mysql_fetch_array($row)){
echo $row[username] . " : " . $row[password] . "<br>";
}
What if there are 5 rows, is there any way i can use a for loop to get something like:
$result=mysql_query("SELECT * FROM users");
for ($i=0;$i<3;$i++){
echo $row[$i.username] . " : " . $row[$i. password] . "<br>";
}
I know that wont work but is ther some way i can acces the row like an array and grab the vairable username and password. What if 3 things are selected but i want the 2nd index?
is there any way to do it?