我不确定我的记忆是否错误,但是当我上次使用PHP(多年前)时,我依旧记得做过这样的事情:
$firstVariable, $secondVariable = explode(' ', 'Foo Bar');
请注意,上面的语法不正确,但在此示例中,它会将'Foo'分配给$ firstVariable,将'Bar'分配给$ secondVariable.
这个的正确语法是什么?
谢谢.
php arrays list
arrays ×1
list ×1
php ×1