$sql="SELECT * my_table" $result = mysql_query($sql); while($row = mysql_fetch_array($result)) { echo $row['fieldname']; }