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>"; Quote 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 (edited) 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>"; Edited February 4, 2014 by Ch0cu3r Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.