| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Member | Alternating string splits I need to know how to break a string up into alternating sizes. for example, I need this string broken up: "hi, how are you, peace!" so results are like this: "hi" ", h" "ow" " ar" " y" "ou " ", p" "eac" "e!" Note the spaces. Basically, I need a string to be cut up by a pattern of 2 characters, then 3 characters, then 2 characters, then three characters How would I do that in PHP? Thank You
__________________ I wonder... |
| |
| | #2 (permalink) |
| NamePros Member | Try this (I think you forgot the 'e' in 'are' in your example =P) PHP Code: |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Seeking php function to strip invalid characters from string | RJ | Programming | 9 | 03-31-2005 11:34 PM |
| XML return string | namescanada | Programming | 0 | 02-16-2005 02:11 PM |
| PHP Help Needed (String Manipulation) 100 NB Awarded | DomainSpring | Programming | 5 | 09-05-2004 12:46 AM |
| String parsing prob, special characters | web guru | Programming | 2 | 10-03-2003 11:50 AM |
| VeriSign splits off domain registrar. | Jeff | Industry News | 0 | 06-17-2003 07:59 PM |