JackCode Posted February 4, 2014 Share Posted February 4, 2014 echo "<td class='left'><a href='member.php?id=<?php echo $dnn['id']; ?>'>$username<?php echo htmlentities($dnn['username'], ENT_QUOTES, 'UTF-8'); ?></a></td>"; Link to comment https://forums.phpfreaks.com/topic/285944-linking-up-the-correct-quotation-marks/ Share on other sites More sharing options...
Ch0cu3r Posted February 4, 2014 Share Posted February 4, 2014 Remove the PHP tags within your string. Variables are expanded within double quotes. However more complicated variables, such as associative arrays need to be wrapped in braces Also functions cannot be called within strings, so you need to use the concatenation operator. echo "<td class='left'><a href='member.php?id={$dnn['id']}'>$username".htmlentities($dnn['username'], ENT_QUOTES, 'UTF-8')."</a></td>"; Link to comment https://forums.phpfreaks.com/topic/285944-linking-up-the-correct-quotation-marks/#findComment-1467746 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.