Jump to content

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


miseleigh

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!

Archived

This topic is now archived and is closed to further replies.

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