You are here: Re: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' « PHP Programming Language « IT news, forums, messages
Re: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';'

Posted by Jerry Stuckle on 07/04/07 21:55

thanos wrote:
> I'm sure this is a common erro amongst newbies like me but what i'm
> trying to echo is text with html tags. Look below. I'm sure there is
> something wrong with my syntax. You help much apprecaited. I get the
> error line after the first </table>';.
>
> // print intro
> echo '<div id="memcol">
^
Your beginning quote:

> <table width="100%" border="0" cellpadding="0">
> <tr>
> <th><h3>Welcome!</h3></th>
> </tr>
> <tr>
> <td><p> Thank you helping me out. We hope you find our service
> educational. Provided below is a table with the details of our
> current (open positions) portfolio. Please note that the Portfolio is
> updated each business day (before 7pm EST). </p>
> <p> To review the details of our initial trade alerts, simply click on
> the highlighted symbol.</p>
> <p>If you are new please take your time to look around. Should you
> have and questions or concerns, please feel free to <a href='/
^
This is your end quote for the string!
> contact.php'>contact us</a> with your comments.</p></td>
> </tr>
> </table>';
>
> // print info into table
> echo '<table class="medit" width="100%"><tr><th colspan=7> <h2>E-
> StockPro Portfolio as of ' . $today .'</h2></th></tr> <tr>
> <td>Date</td><td> Symbol</td> <td>Price</td> <td> Target</td><td>
> Current</td> <td>Gain/Loss</td> <td>Stop</th></tr>';
> while(list($entry_date, $option_symbol, $entry_p, $target_p,
> $current_p, $gain, $stop_p) = mysql_fetch_array($result))
> {echo "<tr><td>$entry_date</td><td>$option_symbol</td><td>$entry_p</
> td><td>$target_p</td><td>$current_p</td><td>$gain</td><td>$stop_p</
> td></tr>";
> }
> echo '</table>';
> echo '<br>';
>

And BTW - I hate this type of coding. Normally I exit to HTML mode for
html like this - especially so many lines. Another way would be to use
HEREDOC syntax.

But now you see why I don't like this syntax.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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