Possible Duplicate:
Split word by capital letter
how i can transform one string in one array with the rule for capitalize letters? Ex:
$string = "TimBurton";
$array[0] = "Tim";
$array[1] = "Burton";
Possible Duplicate:
Split word by capital letter
how i can transform one string in one array with the rule for capitalize letters? Ex:
$string = "TimBurton";
$array[0] = "Tim";
$array[1] = "Burton";
$array = preg_split('/(?=[A-Z])/', $string);
See it here in action: http://codepad.viper-7.com/0E2DqO