String $uri:
/profile/asd/
I run this on the string:
$uri_arr = preg_split('/\//',$uri,-1,PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY);
Result:
Array ( [0] => profile [1] => asd )
I thought PREG_SPLIT_DELIM_CAPTURE was supposed to conserve /
if not I would use explode instead...