note 11286 modified in ereg by jmcastagnetto

From: Date: Wed, 14 Feb 2001 19:50:01 +0000
Subject: note 11286 modified in ereg by jmcastagnetto
Groups: php.notes 
Request: Send a blank email to php-notes+get-11062@lists.php.net to get a copy of this message
[Editor's note: simpler solution, use preg_match_all()] To extract multiply entries of regexp pattern use this example: $string="1111111111111111111111<--2-->1111111111111111111111<--3-->11111111111111111<--4-->111111"; while (ereg("<--(.)-->",$string,$result)) { $string=substr($string,strpos($string,$result[0])+strlen($result[0])); echo "|$string|<br>"; echo "|$result[1]|<br>"; } http://www.php.net/manual/ereg.php

« previous php.notes (#11062) next »