I want to split array element's string. I have to split it at the fifth character, but if it's in the middle of the word, split it at the nearest whitespace. Like this:
// I have array like these
$array={"How are you ?","I am fine."};
//I want output like if we take length = 5.
$array1 = {"How are","you ?","I am fine."}; // array1[0] =how a should be array1[0] = how are .