[PHP] easy spliting
Hi, I know it is easy but I can't figure how I should do I want to split a string from position 1 to 9, from 10 to 36, from 37 to 54 and so on... how can I do this? is there a function who does this? Regards, Alx
Re: [PHP] easy spliting
Are there specific patterns associated with each range of numbers? If not, then just use a couple substr() calls to get what you want. That'll be the fastest method. Or you could use a regular expression like /(.{9})(.{26})(.{17))/ possibly. ---John Holmes... - Original Message - From: Alex Ciurea [EMAIL PROTECTED] To: php mailing [EMAIL PROTECTED] Sent: Wednesday, December 18, 2002 8:57 AM Subject: [PHP] easy spliting Hi, I know it is easy but I can't figure how I should do I want to split a string from position 1 to 9, from 10 to 36, from 37 to 54 and so on... how can I do this? is there a function who does this? Regards, Alx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] easy spliting
You may want to provide more information like why is this string being split at these seemingly random points? Maybe there is a common separator or could be? But anyway it sounds like you want substr(). http://www.php.net/substr Regards, Philip Olson On Wed, 18 Dec 2002, Alex Ciurea wrote: Hi, I know it is easy but I can't figure how I should do I want to split a string from position 1 to 9, from 10 to 36, from 37 to 54 and so on... how can I do this? is there a function who does this? Regards, Alx -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php