forms - How to get an array the correct way in Joomla (2.5/3.x) -


<form> <input type="checkbox" name="item[]" value="1" /> <input type="checkbox" name="item[]" value="2" /> <input type="checkbox" name="item[]" value="3" /> </form> <?php $app = jfactory::getapplication(); $items = $_post['type']; // works not joomla wise...  $items = $app->input->getarray(array('type_ids')); // tried multiple ways can't work. ?> 

what should correct way load form items array $items?

for components using legacy following code works (version 3.3):

 $jinput = jfactory::getapplication()->input;  $data2  = $jinput->post->getarray(array());  var_dump($data2); 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -