Hi,
A quick and most likely simply question about which is generally better
programming with PHP. Is it more proper to break out of PHP code to write
HTML, or is it ok rto do it within print() statements? Such as...
SCRENARIO A)
<?php
....code...
?>
<img src="<?=$imgsrc ?>">
<?php
....more code...
?>
SCENARIO B)
<?php
....code...
print("<img src=\"".$imgsrc ."\">");
....more code...
?>
Thanks,
Michael
A quick and most likely simply question about which is generally better
programming with PHP. Is it more proper to break out of PHP code to write
HTML, or is it ok rto do it within print() statements? Such as...
SCRENARIO A)
<?php
....code...
?>
<img src="<?=$imgsrc ?>">
<?php
....more code...
?>
SCENARIO B)
<?php
....code...
print("<img src=\"".$imgsrc ."\">");
....more code...
?>
Thanks,
Michael
Comment