is there a builtin php function for this ?

From: Date: Tue, 09 Jan 2001 20:11:14 +0000
Subject: is there a builtin php function for this ?
Groups: php.general 
Request: Send a blank email to php-general+get-33533@lists.php.net to get a copy of this message
<? function add_all($array) { foreach($array as $pos => $val) @$sum += $val; return @$sum; } $price[123] = 5; $price[123] = 2; $price[123] = 7; $price[123] = 9; $tax = 0.14; echo add_all($price) * $tax; ?> is there a built in function to replace add_all, I would like to have a add_all, multiply_all, divide_all, etc etc. a php function would just be nicer... Chris Lee Mediawaveonline.com

« previous php.general (#33533) next »