Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php sum array key

$names=array(
	array("name"=>"taylor","age"=>35),
 	array("name"=>"susan","age"=>30),
);
array_sum(array_column($names, 'age')); //65
 
PREVIOUS NEXT
Tagged: #php #sum #array #key
ADD COMMENT
Topic
Name
1+4 =