Forum Moderators: coopster
Should be ok I think. I assume you wanted the username in the a tags?
I would do it in single quotes personally:
<td><?php echo '<a href = "#" onclick = "fnCheck('.$row['user_name'].'")>'.$row['user_name'].'</a>'; ?></td>
dc
how do i decide when to use single or double quotes are there any rules for using it?
<?php
$var = '$var';
$vara = 'ha';
$text = "$vara";
echo $text; //Outputs ha
echo $vara; //Output ha
echo $var; /* Outputs $var as it was in single quotes. php does no process variables in single quotes. So $var = '$tex la' outputs $tex la. But, $var = "$tex la" outputs the contents of $tex and then la. */
?>