更新时间:2023-12-04 13:35:52
如果您知道要获取的变量数(在本例中为2),则可以直接将它们分配给list
:
If you know the number of variables you're expecting to get back (ie. 2 in this case) you can just assign them directly into a list
:
list($first, $second) = explode('~', $a);
// $first = 'hello';
// $second = 'world';