PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
aja626
Forum Newbie
Posts: 1 Joined: Thu May 21, 2009 7:55 am
Post
by aja626 » Thu May 21, 2009 8:05 am
I'm a newbie here.... I've been getting an parse error with the following code can someone help.
Code: Select all
<?php echo '<a href="details.php?article_id='.$row['article_id'].'">'echo $row['title']'</a>' ; ?>
Error:
Parse error: parse error, expecting `','' or `';''
Last edited by
Benjamin on Thu May 21, 2009 8:44 am, edited 1 time in total.
Reason: Added [code=php] tags.
jaoudestudios
DevNet Resident
Posts: 1483 Joined: Wed Jun 18, 2008 8:32 am
Location: Surrey
Post
by jaoudestudios » Thu May 21, 2009 9:39 am
<?php echo '<a href="details.php?article_id='.$row['article_id'].'">'echo $row['title']'</a>' ; ?>
Use this...(you dont need an echo)...
Code: Select all
<?php echo '<a href="details.php?article_id='.$row['article_id'].'">'.$row['title'].'</a>' ; ?>
myismymxd
Forum Newbie
Posts: 5 Joined: Wed May 20, 2009 10:41 am
Post
by myismymxd » Thu May 21, 2009 10:06 am
You can write codes like this::
Code: Select all
<?php echo " <a href=\"details.php?article_id={$row['article_id']}\">{$row['title']} </a>";
?>
Last edited by
Benjamin on Thu May 21, 2009 10:43 am, edited 1 time in total.
Reason: Added [code=php] tags.