sql - Echo HTML within PHP where to place quotes -


i'm doing wrong first line, quotes:

  <td><? echo"<a href='edit.php?id=" . "$row['adminuser_id']" . "'>edit</a>";?></td> 

should work works

echo '<td><a href="edit.php?id=' . $row['adminuser_id'] . '">edit</a></td>'; 

as requested author, post answer.

in of cases don't need echo html tags. better not. echo part, dynamically, in case - variable.

as of php 5.5, shorthand echo tag <?= enabled default standalone tag, has nothing short tags <? disabled, can use without worries short echo achieve this:

<td><a href="edit.php?id=<?=$row['adminuser_id'];?>">edit</a></td> 

of course, can use time way:

<td><a href="edit.php?id=<?php echo $row['adminuser_id'];?>">edit</a></td> 

but in both cases, echo variable.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -