0
$bLangs = array('EN' => 'English', 'RU' => 'Russian');

foreach ($bLangs as $k => $v)
{
    $this->form_validation->set_rules($k."['page_name']", lang('field_name'), 'trim|required');
}

为什么这总是为空 EN[page_name] 返回错误?当我打印 $_POST 一切正常。

我来自视图源的 html 是这样的:

Name: <input type="text" name="EN[page_name]" value="ToDo" class="w750" /><br />
Name: <input type="text" name="RU[page_name]" value="ТоДо" class="w750" /><br />
4

1 回答 1

0

I've changed $k."['page_name']" to $k."[page_name]" and works.

于 2013-01-26T14:51:27.547 回答