note 81823 added to function.strlen

From: Date: Fri, 14 Mar 2008 15:32:35 +0000
Subject: note 81823 added to function.strlen
Groups: php.notes 
Request: Send a blank email to php-notes+get-137064@lists.php.net to get a copy of this message
An easy way to check min string length & max length <?php // set the max length username = 10 if (strlen($username) > 10){ $errMsg .= 'your username is too long<br />'; } if (strlen($username) < 5){ $errMsg .= 'your username is too short<br />'; } ?> ---- Server IP: 87.124.64.96 Probable Submitter: 87.102.61.237 ---- Manual Page -- http://www.php.net/manual/en/function.strlen.php Edit -- https://master.php.net/note/edit/81823 Del: integrated -- https://master.php.net/note/delete/81823/integrated Del: useless -- https://master.php.net/note/delete/81823/useless Del: bad code -- https://master.php.net/note/delete/81823/bad+code Del: spam -- https://master.php.net/note/delete/81823/spam Del: non-english -- https://master.php.net/note/delete/81823/non-english Del: in docs -- https://master.php.net/note/delete/81823/in+docs Del: other reasons-- https://master.php.net/note/delete/81823 Reject -- https://master.php.net/note/reject/81823 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#137064) next »