Splitting a string

The sample string is KmSO4

Every upper case alphabet should be identified and splitted until another upper case alphabet comes.

the string should be splitted so that output array looks like this
Array ( [0] => Km [1] => S [2]=>O4 )

can any one help regarding this issue?

Are you familiar with regular expressions?
You can use preg_split: http://www.php.net/manual/en/function.preg-split.php

See my comment on PHPFreaks (no point duplicating).