FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » syntax question
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: syntax question [message #174330 is a reply to message #174322] Sun, 05 June 2011 03:43 Go to previous messageGo to previous message
jeff is currently offline  jeff   
Messages: 8
Registered: May 2005
Location: Toronto
Karma:
Junior Member
On 6/4/2011 2:16 PM, Co wrote:
> Hi,
>
> I have this code inside a php page to display a table.
>
> $outputList .= '
> <table width="100%" border="0"><tr><td width="12%" valign="top"
> rowspan="4"><div style=" height:80px; overflow:hidden;"><a
> href="profile.php?id=' . $member_id . '" target="_self">' .
> $user_pic . '</a></td></tr>
> <tr><td width="40%"><div class="name" align="left">' . $firstname .
> ' ' . $lastname . '&nbsp;<font color="#000000" style="font-size: 9pt;
> font-weight: normal"> ' . $date_day . ' ' . $date_month . ' ' .
> $date_year . '</div>
> </td></tr><tr><td width="100%" class="title"><a
> href="Printbb_message.php?id=' . $id . '"> ' . $title .'</a></td></
> tr><tr><td width="100%" valign="left">' . $subject . '</td></tr></
> table>' if ($i< $itemsPerPage){ echo '<hr>'; }
> ';

I can't let this go, this is too too too...

You have a table for no apparent reason, with one cell per row. Each row
you have specified a different width for that cell. What's with that?

Derek is right.

As far as the php logic. It appears that you have a variable $outputList
that you are adding on to on each loop. One would assume that you are
doing something like echoing that *later*. Yet you are echoing the hr *now*.

You probably want this instead:

if ($i< $itemsPerPage){ $outputList .= '<hr>'; }

J
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: comment utiliser l'addresse book de thunderbird
Next Topic: help with regular expressions
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 01 00:29:42 GMT 2024

Total time taken to generate the page: 0.04385 seconds