运行 ❯
获取您自己的
PHP
服务器
×
更改方向
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <?php $str = 'one,two,three,four'; // zero limit print_r(explode(',',$str,0)); print "<br>"; // positive limit print_r(explode(',',$str,2)); print "<br>"; // negative limit print_r(explode(',',$str,-1)); ?> </body> </html>
Array ( [0] => one,two,three,four )
Array ( [0] => one [1] => two,three,four )
Array ( [0] => one [1] => two [2] => three )