| 
	
 | 
 Posted by Martin Mandl - m2m tech support on 01/05/07 07:28 
Why don't you try to separate your code from the html part completely, 
e.g. with Smarty (http://smarty.php.net) ??? 
 
Michael wrote: 
> 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
 
  
Navigation:
[Reply to this message] 
 |