Re: split each element of an array
| From: | Robin Vickery | Date: | Wed, 23 Aug 2000 11:02:54 +0000 |
| Subject: | Re: split each element of an array | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-13139@lists.php.net to get a copy of this message | ||
robin@planet-three.co.uk (Robin Vickery) writes:
> $newstuff = array();
>
> foreach( $stuff as $element)
> {
> preg_match_all( "/(.{1,$750})/", $element, $match );
> $newstuff = array_merge( $newstuff, $match[1] );
> }
The regex should read /(.{1,750})/ - sorry.
-robin
--
Robin Vickery...............................................
Planet-Three, 3A West Point, Warple Way, London, W3 0RG, UK
Email: robin@planet-three.net Phone: +44 (0)870 729 5444