I am trying to produce an html code string which includes database info,
but am trying to include the evaluation in the string rather than assigning
it to a variable first:
Code: Select all
for ( $n = $numrows; $n > 0; $n-- ) {
echo "<tr><td align='right'>" . mysql_result($r1,$n,"PIN"); . "</td><td bgcolor='yellow'>" . mysql_result($r1,$n,"Name"); . "</td></tr>";}I realize that I am probably not concatenating a 'string' with the mysql_result. I can
assign the mysql_result to a variable and then use something like:
Code: Select all
for ( $n = $numrows; $n > 0; $n-- ) {
echo "<tr><td align='right'>" , $var , "</td> ...assignments.
I have not been able to find a function that will convert the mysql_result output to a
string, although there must be some way to do that.
Any help appreciated.