miseleigh Posted May 30, 2007 Share Posted May 30, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/53581-solved-echo-html-doesnt-end-where-it-should-extra-text-after-ending-quote/ Share on other sites More sharing options...
pocobueno1388 Posted May 30, 2007 Share Posted May 30, 2007 Are you sure you are working on a server that supports PHP? Quote Link to comment https://forums.phpfreaks.com/topic/53581-solved-echo-html-doesnt-end-where-it-should-extra-text-after-ending-quote/#findComment-264821 Share on other sites More sharing options...
per1os Posted May 30, 2007 Share Posted May 30, 2007 Is the page you are working with a php extension. Because it seems like you are trying to use php in a .html file. Quote Link to comment https://forums.phpfreaks.com/topic/53581-solved-echo-html-doesnt-end-where-it-should-extra-text-after-ending-quote/#findComment-264825 Share on other sites More sharing options...
miseleigh Posted May 30, 2007 Author Share Posted May 30, 2007 Well, it looks like the computer I'm working on doesn't support php, so previewing it in dreamweaver doesn't work. Let me get it uploaded to the server and see if that does it. and yes, it's a .php Quote Link to comment https://forums.phpfreaks.com/topic/53581-solved-echo-html-doesnt-end-where-it-should-extra-text-after-ending-quote/#findComment-264877 Share on other sites More sharing options...
per1os Posted May 30, 2007 Share Posted May 30, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/53581-solved-echo-html-doesnt-end-where-it-should-extra-text-after-ending-quote/#findComment-264879 Share on other sites More sharing options...
pocobueno1388 Posted May 30, 2007 Share Posted May 30, 2007 XAMPP is a great program for PHP/mysql that you can run on your own server. Quote Link to comment https://forums.phpfreaks.com/topic/53581-solved-echo-html-doesnt-end-where-it-should-extra-text-after-ending-quote/#findComment-264880 Share on other sites More sharing options...
miseleigh Posted May 30, 2007 Author Share Posted May 30, 2007 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! Quote Link to comment https://forums.phpfreaks.com/topic/53581-solved-echo-html-doesnt-end-where-it-should-extra-text-after-ending-quote/#findComment-265010 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.