Re: str_split()
| From: | Justin Patrin | Date: | Thu, 12 Aug 2004 18:17:54 +0000 |
| Subject: | Re: str_split() | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-193620@lists.php.net to get a copy of this message | ||
On Thu, 12 Aug 2004 14:11:13 -0400, Aaron Todd <aaloki88@hotmail.com> wrote:
> HAH...I found it. I have version 4.3.3
>
> Does that version not have this function or something?
>
http://us3.php.net/manual/en/function.str-split.php
Look at the top. Only PHP5 is listed.
> Thanks,
>
> Aaron
>
> "John Nichel" <john@kegworks.com> wrote in message
> news:411BAFAE.8020606@kegworks.com...
> > Aaron Todd wrote:
> > > I was just wondering if anyone can look an the following code and tell
> me if
> > > there are any obvious errors. I wrote this in DZsoft PHP editor where
> it
> > > works perfectly. But then when I run it on my webserver it gave me a
> fatal
> > > error:
> > >
> > > Fatal error: Call to undefined function: str_split() in
> > > /home/virtual/site341/fst/var/www/html/test.php on line 12
> > >
> > > <html>
> > > <head>
> > > <title></title>
> > > </head>
> > > <body>
> > > <?php
> > > $teststr = "5176948000";
> > > $parsed = str_split($teststr,3);
> > > echo "$teststr<br>";
> > > echo "$parsed[0]-$parsed[1]-$parsed[2]$parsed[3]";
> > > ?>
> > > </body>
> > > </html>
> >
> > What version of php is your webserver running?
> >
> > --
> > John C. Nichel
> > ÜberGeek
> > KegWorks.com
> > 716.856.9675
> > john@kegworks.com
>
--
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder
paperCrane --Justin Patrin--