Hi
Can you see somthing I am missing?
My form is passing arrays to the process and the process is producing
some errors. I cannot see any problems. In fact I have two other simular
foreach loops that are not creating errors.
Thanks
<?php
$fee2_choice = strip_tags(trim($_POST['fee2_choice']));
$fee2_choice = array_filter($fee2_choice);//line 150
$fee2_choice = ereg_replace("[)(.-]","",$fee2_choice);
$fee2_code = strip_tags(trim($_POST['fee2_code']));
$fee2_code = array_filter($fee2_code); //line 155
$fee2_code = ereg_replace("[)(.-]","",$fee2_code);
$fee2_unit = strip_tags(trim($_POST['fee2_unit']));
$fee2_unit = array_filter($fee2_unit); //line 160
$fee2_unit = ereg_replace("[)(.-]","",$fee2_unit);
$fee2_describe = strip_tags(trim($_POST['fee2_describe']));
$fee2_describe = array_filter($fee2_describe);//line 165
$fee2_describe = ereg_replace("[)(.-]","",$fee2_describe);
$fee2_money = strip_tags(trim($_POST['fee2_money']));
$fee2_money = array_filter($fee2_money); //line 170
$fee2_money = ereg_replace("[)(.-]","",$fee2_money);
//loop through arrays that will be inserted into database
$indices = array_keys($fee2_code); //line 391
foreach($indices as $index) //line 392
{
$fee2_choice[$index];
$fee2_code[$index];//fee_code
$fee2_unit[$index];//number of units
$fee2_describe[$index];//description
$fee2_money[$index];//service fee
//evaluation and insert occur here
}
?>
error messages received when form is submitted:
Warning: array_filter() [function.array-filter]: The first argument should be an array in D:\search_process.php on line 150
Warning: array_filter() [function.array-filter]: The first argument should be an array in D:\search_process.php on line 155
Warning: array_filter() [function.array-filter]: The first argument should be an array in D:\search_process.php on line 160
Warning: array_filter() [function.array-filter]: The first argument should be an array in D:\search_process.php on line 165
Warning: array_filter() [function.array-filter]: The first argument should be an array in D:\search_process.php on line 170
Warning: array_keys() [function.array-keys]: The first argument should be an array in D:\search_process.php on line 391
Warning: Invalid argument supplied for foreach() in D:\pulse_web_server\webroot\pulse\billing\billing_ohip_fee_search_process.php on line 392
:eek: