Jump to content

[SOLVED] Parse error: parse error, unexpected T_SL


dsaba

Recommended Posts

give me this error in parse error:

Parse error: parse error, unexpected T_SL

 

i'm using heredoc syntax like this:

<?php

/////////DISPLAY END OF RESULT TABLE
$endoftable = <<<ENDOFTABLE	
<!-- end of table -->
   <tr valign="top">
            <td height="29" colspan="5" valign="bottom" class="style2"><img src="/images/trans.png" width="9" height="9" /> Translated file <img src="/images/active.png" width="9" height="9" /> Active <img src="/images/halfactive.png" width="9" height="9" /> Half-Active <img src="/images/inactive.png" width="9" height="9" /> Inactive</td>
          </tr>
	</form>
        </table></td>
		 </tr>
<!-- stop -->
ENDOFTABLE;	
echo $endoftable;
mysql_close();

?>

 

any idea what is causing the error?-thanks

Link to comment
Share on other sites

<?php

/////////DISPLAY END OF RESULT TABLE
$endoftable = <<<ENDOFTABLE	
<!-- end of table -->
<tr valign="top">
<td height="29" colspan="5" valign="bottom" class="style2"><img src="/images/trans.png" width="9" height="9" /> Translated file <img src="/images/active.png" width="9" height="9" /> Active <img src="/images/halfactive.png" width="9" height="9" /> Half-Active <img src="/images/inactive.png" width="9" height="9" /> Inactive</td>
</tr>
</form>
</table></td>
</tr>
<!-- stop -->
ENDOFTABLE;	
echo $endoftable;
mysql_close();

?>

 

 

this still doesnt work

Link to comment
Share on other sites

That's because you haven't removed the tab.

 

A tab is an invisible character that appears when you press the tab key on the keyboard.  Move the cursor to immediately after your ENDOFTABLE marker and hit "del", and that should delete the tab.  Do the same for the end of the heredoc and the start.

Link to comment
Share on other sites

thanks for the help btherl!

 

I'm always surprised on new things I had no clue about, as I thought i knew what a tab was, I guess not.

 

Now I have to take "invisible" items into account when debugging errors. Great  ::)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.