Stubbor parse error

Discuss all aspects of programming here.

Moderator: The Mod Squad

Stubbor parse error

Postby Toby B. » Wed Aug 03, 2005 7:10 pm

Parse error: parse error, unexpected T_STRING in /homepages/22/d87841612/htdocs/test/includes/template1.tpl on line 291


Code: Select all
287       <?php
288       if ($update == false) {
289          echo '<p align="left"><b>Notes:</b><br>         The bios program has been altered to $notes specific version. It is not recommended to flash back to the original. If anyone does this successfully please notify us by <a href="/contact.html">email</a>. </p>';
290       
291      '<p align="left"><b> - </b>         <?php echo '<a href='."$f_link".'>'.$flink_descript.'</a>';?>'. </p>';
292} else if ($update == True) {
293   echo '<p align="left"><b>Update(s):</b><br>         <?php echo($updates);?></p>';
294}
295?>


I am working on figuring this out and it probably has to do with quote errors, but I am stumped at this point... :oops:
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine

Postby olly » Wed Aug 03, 2005 9:43 pm

I'm no php expert but it looks to me like you ended a string with a semi colon then started a new line of html
Code: Select all
'<p align="left"><b> - </b>
without closing your php tags or using a new echo.

The first single quote of this line
Code: Select all
'<p align="left"><b> - </b>
looks to be the culprit. Should it be something like this?:

Code: Select all
287       <?php
288       if ($update == false) {
289          echo '<p align="left"><b>Notes:</b><br>         The bios program has been altered to $notes specific version. It is not recommended to flash back to the original. If anyone does this successfully please notify us by <a href="/contact.html">email</a>. </p>'; ?>
290       
291      <p align="left"><b> - </b>
olly
Green Belt
Green Belt
 
Posts: 222
Joined: Thu Jun 27, 2002 8:11 pm

Postby Toby B. » Sun Sep 25, 2005 10:36 pm

olly wrote:I'm no php expert but it looks to me like you ended a string with a semi colon then started a new line of html
Code: Select all
'<p align="left"><b> - </b>
without closing your php tags or using a new echo.

The first single quote of this line
Code: Select all
'<p align="left"><b> - </b>
looks to be the culprit. Should it be something like this?:

Code: Select all
287       <?php
288       if ($update == false) {
289          echo '<p align="left"><b>Notes:</b><br>         The bios program has been altered to $notes specific version. It is not recommended to flash back to the original. If anyone does this successfully please notify us by <a href="/contact.html">email</a>. </p>'; ?>
290       
291      <p align="left"><b> - </b>


Thanks Olly, that got me over the hump. Still have some more work to do with it, but at least there are not permanent parse errors... :P
Toby B.
Lead Mobo-fu Master
Lead Mobo-fu Master
 
Posts: 14277
Joined: Sun Dec 16, 2001 1:01 am
Location: Maine


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest