Split into two variables?

后端 未结 2 1343
独厮守ぢ
独厮守ぢ 2020-12-20 12:03

Say I have the following: \"44-xkIolspO\"

I want to return 2 variables:

$one = \"44\";
$two = \"xkIolspO\";

What would

2条回答
  •  遥遥无期
    2020-12-20 12:57

    Try this:

    list($one, $two) = split("-", "44-xkIolspO", 2);

    list($one, $two) = explode("-", "44-xkIolspO", 2);
    

提交回复
热议问题