note 82091 deleted from function.substr by mgf

From: Date: Tue, 15 Jul 2008 10:57:39 +0000
Subject: note 82091 deleted from function.substr by mgf
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-141517@lists.php.net to get a copy of this message
Note Submitter: Aditya P Bhatt (adityabhai at gmail dot com) ---- Here is my simple test code which you can use: <? $example_html = "<p>sample1 sample2</p><title>hi how are you</title><p>just checking</p>"; $paragraph_text = multi_between('<p>', '</p>', $example_html); //Prints an arry of: //Array ( [1] => sample1 sample2 [2] => just checking ) print_r($paragraph_text); function multi_between($this, $that, $inthat) { $counter = 0; while ($inthat) { $counter++; $elements[$counter] = before($that, $inthat); $elements[$counter] = after($this, $elements[$counter]); $inthat = after($that, $inthat); } return $elements; } //Get the help functions from biohazard's post below. ?>

« previous php.notes (#141517) next »