I'm trying to pull three results from a database and then display them in a
page. The HTML is clugey so I would like to place print statements in three
different places, rather then in a while loop and try and rewrite the HTML
for each item.
So far I have;
$gethot_query = "SELECT title FROM events WHERE status = 'hot' ORDER BY
date";
$gethot_result = mysql_query ($gethot_query)
or die ("Cannot get hot
items!");
$gethot_row = mysql_fetch_array ($gethot_result);
?>
<tr>
<td colspan="7" valign="top" bgcolor="#FFE49A" class="hotheadlines">
<p><br>
<? print ("$gethot_row[1]"); ?></p>
I know I'm not calling the print statement correctly but hopefully you get
the idea. I would like to add
<? print ("$gethot_row[1]"); ?> for the first item.
<? print ("$gethot_row[2]"); ?> for the second
<? print ("$gethot_row[1]"); ?> for the third.
Am I approaching this from the wrong way?
Thanks,
Tom
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]