Uniphix Active member Nov 10, 2011 #1 I have a mass upload feature that I need to filter the array ie something[{$index}][name] something[{$index}][description] something[{$index}][link] How can I filter this???
I have a mass upload feature that I need to filter the array ie something[{$index}][name] something[{$index}][description] something[{$index}][link] How can I filter this???
EasyTarget Well-known member Nov 10, 2011 #2 http://php.net/manual/en/function.array-filter.php explains the array filter function.
Jean-Baptiste Well-known member Aug 7, 2013 #4 Bump. I'm trying to do something similary (filter a mutlidimensionnal array), but I can't get it working.
Bump. I'm trying to do something similary (filter a mutlidimensionnal array), but I can't get it working.
Jean-Baptiste Well-known member Aug 7, 2013 #5 I have just tried with PHP: $_POST['field'][$i]['val'] it is working. Anyway to do that with PHP: $input = $this->_input->filter ?
I have just tried with PHP: $_POST['field'][$i]['val'] it is working. Anyway to do that with PHP: $input = $this->_input->filter ?
truonglv Well-known member Aug 8, 2013 #6 allewreK said: I have just tried with PHP: $_POST['field'][$i]['val'] it is working. Anyway to do that with PHP: $input = $this->_input->filter ? Click to expand... PHP: $array = $this->_input->filter(array( 'arr1' => XenForo_Input::UINT, 'arr2' => XenForo_Input::STRING ));
allewreK said: I have just tried with PHP: $_POST['field'][$i]['val'] it is working. Anyway to do that with PHP: $input = $this->_input->filter ? Click to expand... PHP: $array = $this->_input->filter(array( 'arr1' => XenForo_Input::UINT, 'arr2' => XenForo_Input::STRING ));
Jean-Baptiste Well-known member Aug 8, 2013 #7 Nobita.Kun said: PHP: $array = $this->_input->filter(array( 'arr1' => XenForo_Input::UINT, 'arr2' => XenForo_Input::STRING )); Click to expand... In fact, I don't know the number of array to filter. It's dynamic.
Nobita.Kun said: PHP: $array = $this->_input->filter(array( 'arr1' => XenForo_Input::UINT, 'arr2' => XenForo_Input::STRING )); Click to expand... In fact, I don't know the number of array to filter. It's dynamic.