Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Edit: based on your code sample: try <code>$menu .= &lt;your result&gt;</code> or <code>$menu = $menu . &lt;your result&gt;</code> rather than <code>$menu = &lt;your result&gt;</code>. But its unclear if you are expecting multiple results or not</p> <p>If you are looping through the results of a mySQL query you should be doing something like this:</p> <pre><code>$query = sprintf("SELECT firstname, lastname, address, age FROM friends WHERE firstname='%s' AND lastname='%s'", mysql_real_escape_string($firstname), mysql_real_escape_string($lastname)); // Perform Query $result = mysql_query($query); while ($row = mysql_fetch_assoc($result)) { echo $row['firstname']; echo $row['lastname']; echo $row['address']; echo $row['age']; } </code></pre> <p><a href="http://php.net/manual/en/function.mysql-query.php" rel="nofollow">http://php.net/manual/en/function.mysql-query.php</a></p> <p>If you are looping through the contents of a file you should be doing something like this:</p> <pre><code>&lt;?php $file = fopen("welcome.txt", "r") or exit("Unable to open file!"); //Output a line of the file until the end is reached while(!feof($file)) { echo fgets($file). "&lt;br /&gt;"; } fclose($file); ?&gt; </code></pre> <p><a href="http://www.w3schools.com/php/php_file.asp" rel="nofollow">http://www.w3schools.com/php/php_file.asp</a></p> <p><a href="http://au2.php.net/manual/en/function.fopen.php" rel="nofollow">php manual fopen</a></p> <p>I hope that helps but your question isn't very clear on how/where your using EOF.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload