note 111159 deleted from function.array-sum by levim

From: Date: Tue, 18 Mar 2014 19:44:27 +0000
Subject: note 111159 deleted from function.array-sum by levim
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-198972@lists.php.net to get a copy of this message
Note Submitter: Richie ---- Use this to get the sum of comma separated values: <?php $csv = "1,2,3,4"; echo array_sum(explode(",", $csv)); ?> @igz: You can use mysql_fetch_assoc() to avoid duplicate entries.

« previous php.notes (#198972) next »