I'm stuck - blinders welded on I guess - but i can't see what I'm doing wrong
I'm trying to achieve one row of returned data per line while concatenating a URL to the first field
I've pasted the code and the error received
Can someone else see what I'm doing wrong? I thought a new pair of eyes would help....
Code: Select all
$rs = mysql_query("select blah from blah") or die ("invalid query");
while ($row = mysql_fetch_assoc($rs)) {
for($i = 0; $i < $row; $i++){
echo ("field1: %s field2: %s field3: %s field4: %s", "http://URL.php?id=" . $row["field1"], $row["field2"], $row["field3"], $row["field4"] . "\n");
}
mysql_free_result($rs);
Parse error: syntax error, unexpected ',' in newfile3.php