Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'
Old 10-07-2008, 06:11 AM Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'
Novice Talker

Posts: 9
Trades: 0
PHP Code:
(
'<a href="http://click.linksynergy.com/fs-bin/click?id=1cgmn7/wTjM&offerid=145240.10000041&subid=0&type=4">'
'<IMG border=\"0\" alt="FTPress.com (Pearson Education)" 
src="http://ad.linksynergy.com/fs-bin/show?id=1cgmn7/wTjM&bids=145240.10000041&subid=0&type=4&gridnum=4">' 
</a>); 
The problem is the last line which starts with src. Have no clue whats wrong with it, have tried putting " and or ' at the start and end but still gives the same error.

Last edited by chrishirst; 10-07-2008 at 06:44 AM.. Reason: added code tags
Claudius is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-07-2008, 06:15 AM Re: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
escape ALL of the quote marks
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-07-2008, 06:18 AM Re: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'
Novice Talker

Posts: 9
Trades: 0
same error
Claudius is offline
Reply With Quote
View Public Profile
 
Old 10-07-2008, 06:45 AM Re: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Added [code] tags. Now do you see it?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-07-2008, 07:13 AM Re: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'
Novice Talker

Posts: 9
Trades: 0
See what?

I am new to php like, but still get the same error.
Claudius is offline
Reply With Quote
View Public Profile
 
Old 10-07-2008, 07:35 AM Re: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
look at the syntax colouring in the code in your original post.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-07-2008, 07:40 AM Re: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'
Novice Talker

Posts: 9
Trades: 0
Its all red except for the brackets and </a>

What's that supposed to mean? I tried putting the </a> in a new line and still get the same error on the same line.
Claudius is offline
Reply With Quote
View Public Profile
 
Old 10-07-2008, 07:43 AM Re: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
the </a> should be red as well
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-07-2008, 07:46 AM Re: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'
Novice Talker

Posts: 9
Trades: 0
how do I make it red? lol
Claudius is offline
Reply With Quote
View Public Profile
 
Old 10-07-2008, 07:53 AM Re: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,385
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
move the last single quote to where it should be ...


... after the </a> BUT before the )
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-07-2008, 08:12 AM Re: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'
Novice Talker

Posts: 9
Trades: 0
Woooohoooooooo

Thanks a lot mate

Had to remove all the single quotes except for one at the start and one at the end.

Apparently escaping the quotes seemed to make the urls disfunctional so removed all the escaping lol

And now it works, yeayy.
Claudius is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.30887 seconds with 12 queries