Jump to content

unexpected ' " ' however cannot find the error


Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/66743-unexpected-however-cannot-find-the-error/
Share on other sites

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

 

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.