I need to split a string into chunks of 2,2,3,3 characters and was able to do so in Perl by using unpack:
unpack("A2A2A3A3", 'thisisloremipsum');
However the same function does not work in PHP, it gives this output:
Array
(
[A2A3A3] => th
)
How can I do this by using unpack? I don't want to write a function for it, it should be possible with unpack but how?
Thanks in advance,