Return to Snippet

Revision: 18201
at September 23, 2009 15:55 by paulgrenwood


Initial Code
<?php
if (isset($username[5])) {
// Do something...
}
?>

Initial URL

                                

Initial Description
This snippet uses isset() instead strlen() to verify a PHP variable (in this example $username) is set and is at least six characters long.

Initial Title
isset instead of strlen

Initial Tags
php

Initial Language
PHP