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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -