php把字符串按空格分割成数组?
展开全部
explode
(PHP 4, PHP 5, PHP 7)
explode 亏带薯— Split a string by string
Description
array explode ( string $delimiter , string $string [, 行拦int $limit = PHP_INT_MAX ] )
Returns an array of strings, each of which is a substring of string formed by splitting it on boundaries formed by the string delimiter.
$string = "asdf sdaf asd fsad f asd f as df";
$array = explode(" ",$string);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询