Hi there,
Thanks so basically i am storing info in array in previous script as below.
$CST_array[$CST_count][cost_description]=$line[8];
$CST_array[$CST_count][unit_cost]=$line[9];
$CST_array[$CST_count][number_of_units]=$line[10];
$CST_array[$CST_count][total_cost]=$line[11];
$CST_count++;
then i am sending this via hidden filed t another PHP script
<input type="hidden" name="CST_count" value="<?=$CST_count ?>">
and on second script i want to send CST_count via header but i do not how do i do.
can i do this way
$holiday_search.="CST\t$CST_count[cost_description]\t$CST_count[unit_cost]\t$CST_count[number_of_units]\t$CST_count[total_cost]
or can i do this way
$room_allocation2=array();
//reset($room_allocation);
if($debug){
view_array2($_SESSION["cost_description"],"cost_description");
view_array2($_SESSION["unit_cost"],"unit_cost");
view_array2($_SESSION["number_of_units"],"number_of_units");
view_array2($_SESSION["total_cost"],"total_cost");
}
while (list($key, $value) = each ($_SESSION["cost_description"]))
{
if($value>0){
$holiday_search.="CST\t".$_SESSION["cost_description"][$key]." ".$_SESSION["unit_cost"][$key]." ".$_SESSION["number_of_units"][$key]." "$_SESSION["total_cost"][$key]." ".$value."
";
}
}
this giving me a error message that i am not passing correct varible or array on this line while (list($key, $value) = each ($_SESSION["cost_description"]))
urgent help will appriciated...