I have strings like 20160101
and 20170204
, i want to divide them into array like
arr[0] = 2016;
arr[1] = 01;
arr[2] = 01;
Means first will be 4
character and other ones will be 2
and 2
.I can split it if there any character that can be used for explode.So need help in this issue.