RE: [PHP] explode and implode
| From: | Craig Henderson | Date: | Fri, 11 Aug 2000 01:31:08 +0000 |
| Subject: | RE: [PHP] explode and implode | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-11255@lists.php.net to get a copy of this message | ||
Thanks, I managed to find that info after I sent the email ;-) But it
appears my host doesn't have the proper modules installed for PHP, because I
get this error returned when I try: Fatal error: Call to unsupported or
undefined function array_slice()
Any other ideas? (rather than writing a function that does something like
array_slice)
--Craig Henderson SAE, Adgrafix Corporation
-----Original Message-----
From: Christensen, BruceX R [mailto:brucex.r.christensen@intel.com]
Sent: Thursday, August 10, 2000 6:21 PM
To: 'Craig Henderson'; php-general@lists.php.net
Subject: RE: [PHP] explode and implode
Here's the process:
1. Split your input on the space character and save the result in an array.
2. Get the first 24 elements of the array you just created using
array_slice.
3. Implode that.
4. Repeat steps 2 and 3 for the second array.
Here's the doc: http://www.php.net/manual/function.array-slice.php
--Bruce
Bruce Christensen
Intel Corporation
brucex.r.christensen@intel.com
-----Original Message-----
From: Craig Henderson [mailto:craigh@mail.ocis.net]
Sent: Thursday, August 10, 2000 6:13 PM
To: php-general@lists.php.net
Subject: [PHP] explode and implode
Ok, here is my situation today. I have a form submitting information in a
text box, I want to use explode() to break it up into individual words using
the space character. I then want to separate the array into two pieces, I
want to implode elements 0..24 into a string and implode 25..xx into a
separate string. I read the manual on implode but it doesn't seem to be
clear, can I implode certain elements of the array or just the whole thing?
If I can't implode certain elements is there a function I can use to split
the array into two pieces and then use implode on each piece? Thanks in
advance.
--Craig Henderson SAE, Adgrafix Corporation
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net