PC Nerd Posted August 26, 2007 Share Posted August 26, 2007 Hi, Ive got this code, that is included into the script via: require("File.inc"); and Ive ensured that the file included is enclosed in <?php ?> tags. However im getting the following error. Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in FILE.inc on line 4 Here are the first few lines of that file. <?php $Rates["1 000"] = "190x00“ $Rates["2 000"] = "195x00“; $Rates["3 000"] = "200x00“; ..... Two notes about this. Firstly that the wired "x" etc, is to replace things like "." because for some reason, the page wasnt excepting those as characters, it was acting as thought is was string formatting etc. Also, the file continues on like that for agtes, as theres isnt a mathematic relationship between the values. so theres are about 177 records for it to load. However i can see why it could cause a problem. If anyoen can spot the error, id really apreciate it. Its probably somethign that ive overlooked, however after working at it for a few hours, its driving me mad. Thanks, PC Nerd Quote Link to comment https://forums.phpfreaks.com/topic/66743-unexpected-however-cannot-find-the-error/ Share on other sites More sharing options...
pranav_kavi Posted August 26, 2007 Share Posted August 26, 2007 the error cud b either bcos u vent ended the 1st line wid a semicolon or bcos all the values are not ended wid a proper double quotes i.e " and not “ Quote Link to comment https://forums.phpfreaks.com/topic/66743-unexpected-however-cannot-find-the-error/#findComment-334453 Share on other sites More sharing options...
PC Nerd Posted August 26, 2007 Author Share Posted August 26, 2007 ok, well ihad a look at my quotes, and your right.... sort of. their definately double quotes, however they appeared differently, so i replaced then all with new typed ones and funily enough it worked...... Ive got another error, but i dont think its related, thanks Quote Link to comment https://forums.phpfreaks.com/topic/66743-unexpected-however-cannot-find-the-error/#findComment-334457 Share on other sites More sharing options...
pranav_kavi Posted August 26, 2007 Share Posted August 26, 2007 pls modify the post status to 'SOLVED' Quote Link to comment https://forums.phpfreaks.com/topic/66743-unexpected-however-cannot-find-the-error/#findComment-334458 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.