I have a string- 3,3,2,2,3,3,3,2,3 -

Is it possible to explode it by length, such as:
1-> [3,3,2]
2-> [2,3,3]
3-> [3,2,3]

There are two possibilities and are as follows

<?php
//method 1
explode(',',$input);

//method 2
str_split ($input,6);
?>

Thanks cwarn. That was what I was looking for. :-)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.