gak. everyone ignore me.
idiocy is setting in this late at night.
stoopid me put a </table> tag INSIDE the loop.
and thanks CC Zona for the pointer on the var_dump() - very helpful!
regards,
jaxon
On 2/25/01 2:38 AM, "Jaxon" <[EMAIL PROTECTED]> wrote:
> I replaced extract() with $row[] - much better.
>
> Now I have the strangest thing happening - the <td align="right"> html
> formatting only applies to the first iteration in the loop, even though it
> shows up in the html source!!
>
> regard,
> jaxon
>
>
> html generation:
> ----------------
> for ($i = 1; $i <= 5; $i++)
>
> {
> $sql="select stuff from table";
> $result = mysql_query($sql, $link_id);
> $row = mysql_fetch_row($result);
>
> echo "
> <tr><td><h3>$row[2]</h3></td></tr>
> <tr><td><h4>$row[3]</h4></td></tr>
> <tr><td align=\"right\"><h6>$row[1]</h6></td></tr>
> <tr><td>$row[4]</td></tr>
> <tr><td align=\"right\"><a
> href=\"news.php?#$row[0]\"><h5>...more</h5></a></td></tr>
>
> <hr />
> ";
>
> echo "</table>";
> }
>
> resultant source:
> -----------------
> <table border="0" cellpadding="1" cellspacing="0">
> <tr><td><h3>First Headline</h3></td></tr>
> <tr><td><h4>first subtitle</h4></td></tr>
> <tr><td align="right"><h6>2001-02-24</h6></td></tr>
> <tr><td>get it right here now... this is the place to be, I tell
> you</td></tr>
> <tr><td align="right"><a
> href="news.php?#1"><h5>...more</h5></a></td></tr>
> <tr><td><hr /></tr></td>
> </table>
> <tr><td><h3>SECOND HEADLINE!</h3></td></tr>
> <tr><td><h4>second subtitle</h4></td></tr>
> <tr><td align="right"><h6>0000-00-00</h6></td></tr>
> <tr><td>even more good stuff coming out of our second news
> item!!!</td></tr>
> <tr><td align="right"><a
> href="news.php?#2"><h5>...more</h5></a></td></tr>
> <tr><td><hr /></tr></td>
> </table>
> <tr><td><h3>HEADLINE 3!!!</h3></td></tr>
> <tr><td><h4>subtitle 3</h4></td></tr>
> <tr><td align="right"><h6>2001-02-26</h6></td></tr>
> <tr><td>getcha third item here!!</td></tr>
> <tr><td align="right"><a
> href="news.php?#3"><h5>...more</h5></a></td></tr>
> <tr><td><hr /></tr></td>
> </table>
>
--
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]