Correct syntax

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

Post Reply
kkonline
Forum Contributor
Posts: 251
Joined: Thu Aug 16, 2007 12:54 am

Correct syntax

Post by kkonline »

Code: Select all

 
<?php echo "<a href = \'#\' onclick = \"."fnCheck(".$row['user_name']."\")>"<a/>. $row['user_name']?>
kindly please help me write the correct syntax of the code
bertfour
Forum Commoner
Posts: 45
Joined: Fri Mar 07, 2008 7:33 am

Re: Correct syntax

Post by bertfour »

Code: Select all

echo '<a href="#" onclick="fnCheck("' . $row['user_name']. '")><a/>' . ' ' . $row['user_name'];
Is one of the possibilities...
kkonline
Forum Contributor
Posts: 251
Joined: Thu Aug 16, 2007 12:54 am

Re: Correct syntax

Post by kkonline »

Hi how do I get to know when to use a single quote and when to use a double quotes. Is there any set of rules that help you decide
Post Reply