0

I am learning php and Ajax, but I see a code where <? is used.

<?php while($row=mysql_fetch_array($result)) { ?>
<option value=<?=$row['id']?>><?=$row['statename']?></option>

Please could you help me to understand why is

user3272713
  • 167
  • 2
  • 5
  • 15

2 Answers2

2

You can use

<?=$row['statement'] ?>

as a convenient shorthand to

<?php echo $row['statement'] ?>

this can improve readability.

Victory
  • 5,811
  • 2
  • 26
  • 45
1

Read the manual.

It will explain everything about tags.

http://www.php.net/manual/en/language.basic-syntax.phpmode.php

Daniel Williams
  • 8,673
  • 4
  • 36
  • 47