Page 1 of 1

Correct syntax

Posted: Sat Mar 08, 2008 6:02 am
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

Re: Correct syntax

Posted: Sat Mar 08, 2008 7:11 am
by bertfour

Code: Select all

echo '<a href="#" onclick="fnCheck("' . $row['user_name']. '")><a/>' . ' ' . $row['user_name'];
Is one of the possibilities...

Re: Correct syntax

Posted: Sat Mar 08, 2008 10:34 pm
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