note 106165 added to function.array-sum

From: Date: Sat, 15 Oct 2011 10:02:20 +0000
Subject: note 106165 added to function.array-sum
Groups: php.notes 
Request: Send a blank email to php-notes+get-183899@lists.php.net to get a copy of this message
As mysql_fetch_array returns associative and numeric indexes, you can simply use a flag. $result = mysql_query("SELECT id, name FROM mytable"); $row = mysql_fetch_array($result, MYSQL_NUM); array_sum($row); Hope it helps. ---- Server IP: 69.147.83.197 Probable Submitter: 119.152.59.145 ---- Manual Page -- http://www.php.net/manual/en/function.array-sum.php Edit -- https://master.php.net/note/edit/106165 Del: integrated -- https://master.php.net/note/delete/106165/integrated Del: useless -- https://master.php.net/note/delete/106165/useless Del: bad code -- https://master.php.net/note/delete/106165/bad+code Del: spam -- https://master.php.net/note/delete/106165/spam Del: non-english -- https://master.php.net/note/delete/106165/non-english Del: in docs -- https://master.php.net/note/delete/106165/in+docs Del: other reasons-- https://master.php.net/note/delete/106165 Reject -- https://master.php.net/note/reject/106165 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#183899) next »