I don't think if my code was correct but i'd reviewed PHP manual in function passe by reference. I don't think if i have missed something but can't figure it out..
my function is here:
public function display_victims(&$vName, &$vAddr, &$vAge, &$vGender){
for ($i = 0; $i < count($vName); $i++)
{
echo $vName[$i].'|'.$vAddr[$i].'|'.$vAge[$i].'|'.$vGender[$i];
return true;
}
}
my form was in the other file I send the form in this file named save_data.php here is the code:
$csppoAdmin = new CsppoAdmin();
if ($_REQUEST['save']=='rc'){
extract($_REQUEST);
$post = $csppoAdmin->report_crime($vName, $vAddr, $vAge, $vGender)
echo $post;
}
when I run it the output was only one element of the array or one row only.