RE: [PHP] explode and implode

From: Date: Fri, 11 Aug 2000 01:20:49 +0000
Subject: RE: [PHP] explode and implode
Groups: php.general 
Request: Send a blank email to php-general+get-11254@lists.php.net to get a copy of this message
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

« previous php.general (#11254) next »