Posted by toedipper on 06/28/05 10:06
Ken Robinson wrote:
> toedipper wrote:
>
>>Geoff Berrow wrote:
>>
>>>I noticed that Message-ID: <ZT_ve.4963$ZR1.3064@newsfe2-gui.ntli.net>
>>>from toedipper contained the following:
>>>
>>>
>>>
>>>> </tr>
>>>> <? do { ?>
>>>> <tr>
>>>>76 THIS IS THE ERROR LINE <td><div align=\"center\"><font size=\"2\"><a
>>>
>>>
>>> </tr>";
>>> do { ?>
>>>
>>Thanks Geoff. That cleared th error ok but now it tells me I have a
>>parse error on my final line.
>
>
> You really have a horrible mix of PHP and HTML. In some cases you seem
> to have a "<?" in the middle of a PHP area.
>
> I would suggest you re-write your code to eliminate escaping the double
> quotes using either a heredoc format (see
> <http://www.php.net/types.string> about 1 screen down) or put all of
> the HTML lines into an array and echo the contents of the array at the
> end.
>
> Here's a short example of the second method:
> <?
> $tmp = array();
> $tmp[] = <form method="post" action="' . $_SERVER['PHP_SELF'] . '">';
> $tmp[] = 'Name: <input type=text name="name" style="width:50%">';
> $tmp[] = '<input type="submit" name="submit" value="Do It">';
> $tmp[] = '</form>';
> echo implode("\n",$tmp)."\n";
> ?>
>
> Much easier on the eyes. (IMHO)
>
> Ken
>
Thanks. It was dreamweaver that produced most of it.
Navigation:
[Reply to this message]
|