Jump to content

[SOLVED] echo html doesn't end where it should - extra text after ending quote


Recommended Posts

I'm sure this question has come up before, but it's hard to find answers.  I'm having trouble with my echo statement. 

<?php echo "<a title=\"UPS Systems\" href=\"/ups.html\" class=\"nav\">UPS Systems</a>"; ?>
   <a title="APC" href="/ups/dne.html" class="subnav">APC</a>

results in:

UPS Systems"; ?>  APC

 

where APC is a link like it's supposed to be, but 'UPS Systems' is plain text.  It's as if the ending bracket for the <a> tag isn't recognized, but I can't see how to fix it.

 

Any help would be greatly appreciated.  I've also tried the same statement using single quotes instead of escaped double quotes in the echo statement, and surrounded by single quotes with unescaped double quotes.  I also tried storing the html string in a variable and then echoing the variable; I've gotten the same results each time - any php code after 'UPS Systems' shows up as plain text.  Thoughts?

Yea, php needs a webserver or a program to interpret the command line version of the php file but you must have it installed. That is the crappy thing about dreamweaver, the previews are usually under false pretenses especially when coding.

That was the problem - I just have to upload all my pages now before I can see what they're going to look like.

 

I would use XAMPP, but most of what I do is pure HTML, so dreamweaver's usually good for what I need.

 

Thanks for your help!

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.