note 25247 rejected from function.preg-match-all by nicos
| From: | nicos@php.net | Date: | Mon, 16 Sep 2002 14:35:29 +0000 |
| Subject: | note 25247 rejected from function.preg-match-all by nicos | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-36754@lists.php.net to get a copy of this message | ||
<?php
//get a web page into a string
$fcontents = implode ('', file ('http://www.cnn.com/'));
preg_match_all ("/cnn.com/",$fcontents,$out, PREG_SET_ORDER);
print $out[0];
print $out[1];
print $out[2];
?>
The above does not work. Pretty strange as it is simply a cut and paste of one of the above
examples. One would expect the results to be
cnn.comcnn.comcnn.com
The results are:
ArrayArrayArray
Doesn't make sense.