Run ❯
Get your
own PHP
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
"; // positive limit print_r(explode(',',$str,2)); print "
"; // negative limit print_r(explode(',',$str,-1)); ?>
Array ( [0] => one,two,three,four )
Array ( [0] => one [1] => two,three,four )
Array ( [0] => one [1] => two [2] => three )