You are here: Re: Newbie - expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' « PHP Programming Language « IT news, forums, messages
Re: Newbie - expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING'

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация