finding sum of the array
Posted: Sat Nov 14, 2009 2:22 pm
$prices=array("Brand New Computer"=>2000,"pencil"=>25,"Learning PHP"=>"60");
foreach($prices as $key=>$value) {
}
finding sum of the array e.g say we wanted to to see the price of the 2000 + 25+60 , can we have sum total of the $value ?what if we had a bigger list in the array
ant hlp appreciated
thks
foreach($prices as $key=>$value) {
}
finding sum of the array e.g say we wanted to to see the price of the 2000 + 25+60 , can we have sum total of the $value ?what if we had a bigger list in the array
ant hlp appreciated
thks