Search This Blog

2018/06/12

split in PHP

explode($findThis, $targetString);
explode("/", "ab/dvf/dfa");
> ["ab", "dvf", "dfa"]

str_split($targetString, [int length]);
str_split("dddd");
> ["d", "d", "d", "d"]

str_split("dddd", 2);
> ["dd", "dd"]

No comments :

Post a Comment