include('connect.php');
$query = "SELECT * FROM table WHERE name = 'Apache'";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result) {
echo $row['name'];
}
NOw this is a great way, but imagin you had 20 pieces of data, and dont want to write $row[''] every time. Well here the solution
include('connect.php');
$query = "SELECT * FROM table WHERE name = 'Apache'";
$result = mysql_query($query);
while($row = mysql_fetch_assoc($result) {
extract($row);
echo $name;
}
This simple line of code pulls the $row out of the variablkes, so now you can call on them using the name of the mysql row, without that nasty $row['']