【发布时间】:2011-11-06 13:47:13
【问题描述】:
我将我的数组定义为:
$data1 = array(
'first_name'=>$this->input->post('first_name'),
'last_name'=>$this->input->post('last_name'),
'company'=>$this->input->post('company'),
'email'=>$this->input->post('email'),
'phone'=>$phonenum,
'username'=>strtolower($this->input->post('first_name')) . ' ' . strtolower($this->input->post('last_name'))
这个数组是从控制器发送到 CodeIgniter 中的模型的。当我尝试使用 array_splice 删除电子邮件和用户名时,无法删除正确的元素。用 xdebut 检查时,顺序已更改为:
用户名 电子邮件 名 姓 公司
谁能告诉我为什么?谢谢。 电话
【问题讨论】:
标签: php arrays codeigniter