parse error doubt

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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

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.

liquedus
php-forum Active User
php-forum Active User
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada
Contact:

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:

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

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..

liquedus
php-forum Active User
php-forum Active User
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada
Contact:

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

..... remove the extre double quote....

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

error

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

Code: Select all

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


Return to “PHP coding => General”

Who is online

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