| 
	
 | 
 Posted by gosha bine on 05/17/07 14:38 
Ming wrote: 
> Hi folks, 
>  
> I have a php file, it contains just a few php codes. The php codes I 
> need to use is to construct an object, and use it several times, from 
> html head until the last line of html code. 
 
All php block share the same scope, so it would be enough to construct  
the object only once: 
 
<?php  $myObject = new Foo(); ?> 
html here 
<?php  $myObject->bar(); ?> 
more html 
<?php  $myObject->baz(); ?> 
 
 
--  
gosha bine 
 
extended php parser ~ http://code.google.com/p/pihipi 
blok ~ http://www.tagarga.com/blok
 
  
Navigation:
[Reply to this message] 
 |