Re: Load All blocks

From: Date: Wed, 23 Oct 2002 11:28:16 +0000
Subject: Re: Load All blocks
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-121062@lists.php.net to get a copy of this message
You might want to try using split() function. www.php.net/split --- Maxim Maletsky maxim@php.net www.PHPBeginner.com // PHP for Beginners www.maxim.cx // my Home // my Wish List: ( Get me something! ) http://www.amazon.com/exec/obidos/registry/2IXE7SMI5EDI3 "Alawi" <alawi@php4web.com> wrote... : > How can I load all blocks > plz take a look to this function to understand me > > **************************************************************************************************** > function STATIC_BLOCK($name, $template_handle) > { > if ( $this->IS_TEMPLATE($template_handle) ) { > if ( ! $this->IS_READ($template_handle) ) { > $this->READ_TEMPLATE($template_handle); > } // end if > $template_content = $this->HANDLE[$template_handle]['CONTENT']; > $pattern = "<!-- STATIC BLOCK : $name -->(.*)<!-- END STATIC BLOCK > : $name -->"; > ereg ($pattern,$template_content,$result); > $this->HANDLE[$template_handle]['CONTENT'] = > ereg_replace($pattern,"-^STATICBLOCK:$name^-",$template_content); > if ( ! empty($result[1]) ) { > > $this->STATIC_BLOCK[$name] = array ( 'CONTENT' => $result[1], > 'TEMP' => $result[1], > 'ELEMENTS' => array() ); > > } // enf if > > } else { > $this->ERROR_MSG("You Can not load this block because the block is not > found" . $name); > } // end if > } // end STATIC_BLOCK function > > > ----------------------------------------------------------------------------------------------------------------------------------------------------- > I want from this fuction to load all blocks if i am not put any thing in $name variable

« previous php.general (#121062) next »