Skip to content
Advertisement

Tag: strsplit

Split string into 2 letters

I am trying to split a string into 1, 2 and 3 segments. For example, i currently have this: Which works well on 1 character splitting, I get: However when I try: I get: Is there a way so that I can output this? : and then also with 3 characters like this? Answer Here it is: PHPFiddle Link: http://phpfiddle.org/main/code/1bvp-pyk9

Advertisement