Jump to content

want one result per line


webguync

Recommended Posts

I am trying to get my results to print one per line, but what I have isn't working.

 

<?php

$result = mysql_query("SELECT incorrect_resp FROM TableName");

while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
    printf("Incorrect response %s", $row["incorrect_resp"],"\n");
}

mysql_free_result($result);
?>

Link to comment
https://forums.phpfreaks.com/topic/172328-want-one-result-per-line/
Share on other sites

thanks,

 

I tried this though and it didn't work.

 

<?php

$result = mysql_query("SELECT incorrect_resp FROM TableName");

while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
    printf("Incorrect response %s", $row["incorrect_resp"],"<br />");
}

mysql_free_result($result);
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.