echo " <table> <tr> <td><a href='page.php?id=<?=$myrow4[id]';?>><img alt='аватар' src='<?=$avatar;?>'></a></td> <td>Автор: <a href='page.php?id=<?=$myrow4[id]';?>><?=$author;?></a><br> Дата: <?=$messages['date'];?><br> Сообщение:<br> <?=$messages['text'];?><br> </td> </tr> </table>"; 

What is wrong here please tell me? gives a syntax error (

  • one
    replace echo with <? php?> - zb '
  • No, this is just a piece of code. Don't be fooled by the fact that I didn’t escape the <? php?> script in the document. This is .. - DanteLoL
  • @DanteLoL, but why do you make php-inserts, for example, <? = $ Myrow4 [id] ';?>. This is the first thing that catches your eye. - andreyqin

1 answer 1

Two options:

 ?> <table> <tr> <td><a href='page.php?id=<?=$myrow4['id'];?>'><img alt='аватар' src='<?=$avatar;?>'></a></td> <td>Автор: <a href='page.php?id=<?=$myrow4['id'];?>'><?=$author;?></a><br> Дата: <?=$messages['date'];?><br> Сообщение:<br> <?=$messages['text'];?><br> </td> </tr> </table>; <?php 

 echo " <table> <tr> <td><a href='page.php?id={$myrow4['id']}'><img alt='аватар' src='$avatar'></a></td> <td>Автор: <a href='page.php?id={$myrow4['id']}'>$author</a><br> Дата: {$messages['date']}<br> Сообщение:<br> {$messages['text']}<br> </td> </tr> </table>"; 

and your code is something weird.

  • Bingo) 2nd) - DanteLoL
  • mmm helped topomoglo but the width of the table is not fixed anyway, its content rattles it \ advise how to fix the width ?? - DanteLoL pm