Jump to content
MakeWebGames

Recommended Posts

Posted

there is a unexpected T_String on line 2. i scanned but dont see the problem, can someone help me.

print "<center><font size='4' face='Arial, Helvetica, sans-serif'>Mail Box</font><hr width=90%><table width=90% border=0><tr>
<td width=20% align=center>> <a href="http://mailbox.php?action=compose" target="_blank"> Compose</a></td>
<td width=20% align=center>> <a href="http://mailbox.php?action=outbox" target="_blank"> Outbox</a></td>
<td width=20% align=center>> <a href="http://mailbox.php?action=archive" target="_blank"> Save</a></td>
<td width=20% align=center>> <a href="http://mailbox.php?action=delall" target="_blank"> Delete All</a></td>
<td width=20% align=center>> <a href="http://mailbox.php?action=mailhome" target="_blank"> Inbox</a></td>
Posted

Basically you cannot use the same quotes in your code

print "<a href="

will not work

print "<a href='

will work

print '<a href='

will not work

print '<a href="

will work

You may wish to consider why keep it in your PHP code anyway.

There is always the option to end the PHP code ?> and just use HTML

  • Like 1
Posted

Actually, with the amount people use it, you'd be surprised. It's not to do with the use of variables, that would be within the quote. Double quotes will look for a variable whereas single quotes won't.

They are both language constructs, and echo is better to use simply because it's shorter to write. The difference in speed is minor unless you used it millions of times in one go.

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.   Paste as plain text instead

  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...