note 53598 deleted from function.sort by derick

From: Date: Wed, 31 Aug 2005 10:42:01 +0000
Subject: note 53598 deleted from function.sort by derick
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-94513@lists.php.net to get a copy of this message
Note Submitter: Vennie ---- I needed a function to check user input, them feeding numbers to a form, which represent an order of tasks. Maybe one exists, I don't know. If it does, I couldn't find it. Anyways, this is the simple function I came up with. Feed it an array and it will tell you wether the array's keys follow up on eachother or not. <?php // Check if the array's keys follow up on eachother function seqArray($aInput){ $bBool = true; ksort($aInput); for($i=1; $i<=count($aInput); $i++){ if(!isset($aInput[$i])){ $bBool = false; } } return $bBool; } ?>

« previous php.notes (#94513) next »