Forum Moderators: coopster

Message Too Old, No Replies

syntax error, unexpected T CONSTANT ENCAPSED STRING problem

         

mddu

4:59 pm on May 21, 2007 (gmt 0)

10+ Year Member



I've been all over the line trying to figure out what's doing this this is the line that's throwing the error.

echo '<option value="0"'.(s('display_page') ')')== 0? ' selected="selected"' : '').'>'.l('none').'</option>';

The only thing I can think of is that it's missing a parenthesis somwhere but not entirely sure where. Anyone have any ideas or is there a different problem all together with that line? Any help appreciated.

dreamcatcher

6:59 pm on May 21, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi mddu, welcome to Webmaster World. :)

Are you sure this is correct?

(s('display_page') ')')

Seems to be an unmatched number of parenthesis.

dc

mddu

6:52 am on May 22, 2007 (gmt 0)

10+ Year Member



Not sure it's not my code. I know it doesn't look right. Let me try taking one out to see what that does.

mddu

7:15 am on May 22, 2007 (gmt 0)

10+ Year Member



I got the error fixed but line 1029 is giving me the same error and I can't see it.

echo '<option value="DESC"'.(s('comments_order') ')')== ')')==')=='DESC'? ' selected="selected"' : '').'>'.l('newer_top').'</option>';

This is really getting annoying. I'm about to ditch this thing and find something else.

IndiaMaster

9:24 am on May 22, 2007 (gmt 0)

10+ Year Member



I think there is a mismatch in brackets. Try to rewrite the line yourself and remove the double quotes and replace the single quotes with double quotes.

mddu

5:49 am on May 23, 2007 (gmt 0)

10+ Year Member



I'm not even going to try to figure out that line. I ditched it and decided to try to write my own. Something I've never done before so that should be challenging. Is there like a list somewhere of syntax or how to write proper code. Would like something that's not over my head as the only coding language that I know is HTML.

Any help and links appreciated.

barns101

7:34 am on May 23, 2007 (gmt 0)

10+ Year Member



I found <snip> to be excellent and it'll probably teach you from scratch.

[edited by: dreamcatcher at 12:15 pm (utc) on May 23, 2007]
[edit reason] no urls as per T.O.S [webmasterworld.com].Thanks [/edit]

jecasc

8:03 am on May 23, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you have problems getting the syntax right get a PHP editor like the free EasyEclipse with build in error correction features. It will immediately point out any syntax error as soon as you finished writing a line of code.

mddu

2:17 pm on May 23, 2007 (gmt 0)

10+ Year Member



Thanks. I'm going to look into that software. Dreamweaver just doesn't show me code errors just browser check errors. If it does show syntax errors I haven't found it on there yet.

I must've missed the no url's allowed thing on the tos. I was exhausted when I read it. So I won't ask for a site again. Sorry bout that.