note 16515 deleted from function.array-intersect by jimw

From: Date: Fri, 02 Nov 2001 17:21:45 +0000
Subject: note 16515 deleted from function.array-intersect by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-20308@lists.php.net to get a copy of this message
i didn't found any funcs for counting occurences in an array, so i use something like that : $a[0] = "0"; $a[1] = "1"; $a[2] = "2"; $a[3] = "3"; $a[4] = "1"; $a[5] = "5"; $a[6] = "1"; $a[7] = "7"; $b[0] = "2"; $c = array_diff($a, $b); echo (count($a) - count($c)); if you know a better way to do it - mail me :)

« previous php.notes (#20308) next »