【发布时间】:2011-10-25 05:19:05
【问题描述】:
这里的交易是我有一个包含 17 个元素的数组。我想获取一段时间内需要的元素并将它们从数组中永久删除。
代码如下:
$name = $post['name'];
$email = $post['email'];
$address = $post['address'];
$telephone = $post['telephone'];
$country = $post['country'];
unset($post['name']);
unset($post['email']);
unset($post['address']);
unset($post['telephone']);
unset($post['country']);
是的,代码很丑,不需要 bash。如何让这个看起来更好?
【问题讨论】:
标签: php