I know "explode" splits the string and turns it into an array for every occurrence. But how do I split on the third occurrence and keep everything after the third occurrence?
Examples 1:
$split = explode(':', 'abc-def-ghi::State.32.1.14.16.5:A);
I would like this to output:
echo $split[0]; // abc-def-ghi::State.32.1.14.16.5
echo $split[1]; // A
Examples 2:
$split = explode(':', 'def-ghi::yellow:abc::def:B);
I would like this to output:
echo $split[0]; // def-ghi::yellow
echo $split[1]; // abc::def:B