note 43520 added to function.array-intersect

From: Date: Thu, 24 Jun 2004 10:27:09 +0000
Subject: note 43520 added to function.array-intersect
Groups: php.notes 
Request: Send a blank email to php-notes+get-71581@lists.php.net to get a copy of this message
Just a small mod to ben's code to make it work properly: <?php if(sort(array_unique($b + $a)) === sort($b)) // $a is legit } ?> This is useful for checking for illegal characters in a username. ---- Manual Page -- http://www.php.net/manual/en/function.array-intersect.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+43520 Delete -- http://master.php.net/manage/user-notes.php?action=delete+43520&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+43520&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#71581) next »