Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

parse error doubt

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

parse error doubt

Postby Alicia » Sun Nov 30, 2003 7:15 pm

Hi guys,

May i know whats wrong with my code ?

code:
$reference = "<a name=\""".$row['bookmark'].""\"></a>";


I am actually trying to output the php as:
<a name="value"></a>
in my file..

please advise.
Alicia
New php-forum User
New php-forum User
 
Posts: 94
Joined: Sun Sep 21, 2003 5:30 pm

Postby liquedus » Sun Nov 30, 2003 7:55 pm

your error is right there

$reference = "<a name=\""".$row['bookmark']." " \"></a>";

its a second double quote... right after the concat operator
:wink:
liquedus
php-forum Active User
php-forum Active User
 
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada

Postby Alicia » Sun Nov 30, 2003 8:26 pm

so how can i rectify the error ?

p.s: i tried to use brace as well, but it doesn't seem to work.

Please advise..
Alicia
New php-forum User
New php-forum User
 
Posts: 94
Joined: Sun Sep 21, 2003 5:30 pm

Postby liquedus » Sun Nov 30, 2003 9:17 pm

..... remove the extre double quote....
liquedus
php-forum Active User
php-forum Active User
 
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada

error

Postby ruturajv » Sun Nov 30, 2003 9:52 pm

Code: Select all
$reference = "<a name=\"".$row['bookmark']."\"></a>";
User avatar
ruturajv
php-forum Super User
php-forum Super User
 
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India


Return to PHP coding => General

Who is online

Users browsing this forum: Baidu [Spider], Google [Bot] and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron