![]() |
Please solve my parse errors
following is my php code and the error reads like this parse error in .../mainthead php at line 4 - unexpected T_STRING, expecting ',' or ';'
<?php session_start(); echo "<!--- Main Head Starts --->; \n<link href="assets/jodohStyles.css" rel="stylesheet" type="text/css" /> \n " ; \n<link rel="stylesheet" href="assets/style.css"/> \n"; echo "<s"; echo "tyle type="text/css"> \n --> \n</style>; \n <div id="page"> <span id="e1"></span> </div> \n <d"; \n " ; $row $_SESSION $_SESSION ?> |
You're using the same double qoutes to set the link attributes as you are to open and close the echo string.
PHP Code:
PHP Code:
Hope that explains :) Regards, Martin |
sorry but i hate when people do long strings of echo, its not only a pain to work with but its miserable to try to do normal code having to worry about quotes.
why dont you just turn off php do your html then turn php back on and repeat the process. lol the problem is if you do echo nothing inside that echo can have double quotes unless its a special formated var using dots so you made my point exactly why i hate long strings of echo. You had double quotes inside of double quotes, you cant do that. if your echo has double quotes to start, you can use single quotes inside of that but the next double quote better be the close of that echo, as i said unless its a special formated php var statement. i left your session and row stuff alone, but you cant look at session that way you have to use print_r to do that, you can use the format you have only if you are looking at a particular key of session like to see all of session you can do PHP Code:
PHP Code:
This is much cleaner PHP Code:
|
| All times are GMT +1. The time now is 09:06 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.