作业练习 Zend Framework ?phprequire_once("Zend/Loader.php");Zend_Loader::loadClass("Zend_Validate");Zend_Loader::loadClass("Zend_Validate_InArray");function check_inarray($person){$array = array('张三','李四','王五','赵六','田七');$Validate
作业练习
Zend Framework
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | <?php
require_once ( "Zend/Loader.php" );
Zend_Loader::loadClass( "Zend_Validate" );
Zend_Loader::loadClass( "Zend_Validate_InArray" );
function check_inarray( $person )
{
$array = array ( '张三' , '李四' , '王五' , '赵六' , '田七' );
$Validate = new Zend_Validate_InArray( $array );
if ( $Validate -> isValid( $person ))
{
echo "有这个人!" ;
}
else
{
echo "没这个人!" ;
}
}
$person = '张三' ;
check_inarray( $person );
?>
|
Copier après la connexion