Welcome Guest, Not a member yet? Register   Sign In
How to send array from view to model
#7

(06-03-2018, 03:49 AM)InsiteFX Wrote: The Query Builder where expects a string as admin said, if you want to pass an array
you need to assign the array index that you want to use in the where clause to a string
property and then use it in the where clause.

PHP Code:
foreach($_POST["array_name"] as $key => $value)
{
 
   $data[$key] = $value;
}

// or

$data array_map(null$_POST["array_name"]); 

Ok I give it a try
E-surf
Reply


Messages In This Thread
RE: How to send array from view to model - by Kennyendowed - 06-03-2018, 04:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB