note 75016 deleted from function.explode by nlopess
| From: | nlopess@php.net | Date: | Sat, 12 May 2007 11:31:36 +0000 |
| Subject: | note 75016 deleted from function.explode by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-126451@lists.php.net to get a copy of this message | ||
Note Submitter: Tontonq at hotmail dot com
----
Here is an example function for splitting data without using regular expression
Example Using:
<?php
function arasi($tontonq,$a,$b)
{
$x = explode($a,$tontonq);
$z = explode($b,$x[1]);
$oh = $z[0];
if($x && $z) { return $oh; } else { return false; }
}
$alexa = file_get_contents("http://www.alexa.com");
$hotsearch = arasi($alexa,'<div class="hot">','</div>');
echo $hotsearch;
?>
We love php for there are a lot function to be used as easily and writing faster than other langs