Re: doing with string
| From: | Burhan Khalid | Date: | Wed, 09 Apr 2003 11:05:20 +0000 |
| Subject: | Re: doing with string | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143043@lists.php.net to get a copy of this message | ||
On Wed, 2003-04-09 at 05:52, Artur Bereśniewicz wrote:
> string "abc123efg456"
> array "abc","123","efg","456"
Untested...
$abc = "abc123efg456";
$bits = array();
for ($x = 3; $x <= strlen($abc); $x = $x+3)
{
$bits[] = substr($abc,0,$x);
}
--
Burhan Khalid
phplist[at]meidomus[dot]com
Please add a reply-to: header
in your messages that points
to the mailing list address
so that all mail is properly
archived and viewed.