FRIHOST • FORUMS • SEARCH • FAQ • TOS • BLOGS • COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Stupid "}" error!!!





x-stream
In my php script, there is:

if (condition...blabla) {
something... bla... code...
while (condition) {
bla...
}
code...
}

and php says: "unexpected "}" on line...". But this } is the end of if(), isnīt it? I donīt know why there is an error! I have put the ";" everywhere where it has to be, Iīm sure.
When I leave the if() out, the sript works fine... can anyone help?
wumingsden
x-stream wrote:
In my php script, there is:

if (condition...blabla) {
something... bla... code...
while (condition) {
bla...
}
code...
}

and php says: "unexpected "}" on line...". But this } is the end of if(), isnīt it? I donīt know why there is an error! I have put the ";" everywhere where it has to be, Iīm sure.
When I leave the if() out, the sript works fine... can anyone help?


COuld you post the whole of the code if possible ?
Kaneda
Almost impossible to say where the error lies unless you post the actual code Wink

EDIT: wumingsden beat me to it Smile
Marston
Quote:
if (condition...blabla) {
something... bla... code...
while (condition) {
bla...
}
code...
}
The code after your "while" loop looks like it shouldn't be there... Confused

(I'm probably wrong.)
wumingsden
Marston wrote:
Quote:
if (condition...blabla) {
something... bla... code...
while (condition) {
bla...
}
code...
}
The code after your "while" loop looks like it shouldn't be there... Confused

(I'm probably wrong.)


no, i don't think you are but we''ll never know until its posted.
mathiaus
Untill It's all posted, sounds like your code... part hasn't ended. Make sure everything ends with a semicolon ';' or all qotes are closed.
Though as previously mentioned without the code its pretty hard to say
x-stream
Itīs some kind of a wonder!!! Suddenly itīs working!!! Today, I tried it again, and -without changing anything- it worked!!!
I believe in god now Very Happy

(sorry for wasting your time)
wumingsden
x-stream wrote:
Itīs some kind of a wonder!!! Suddenly itīs working!!! Today, I tried it again, and -without changing anything- it worked!!!
I believe in god now Very Happy

(sorry for wasting your time)


Its ok, glad its now working,
Topic -closed-
Related topics
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.