Common php object types. HTMLHEADTITLEphp common numeric judgment function TITLEHEADBODY? Judge the array $ colorsarray (red, blue, green); if (is_array ($ colors) {print (colorsisanarray.br );}
Common php numeric judgment functions
// Determine the array
$ Colors = array ("red", "blue", "green ");
If (is_array ($ colors ))
{
Print ("colors is an array "."
");
}
// Double-precision data determination
$ Temperature = 15.23;
If (is_double ($ Temperature ))
{
Print ("Temperature is a double "."
");
}
// Integer judgment
$ PageCount = 2234;
If (is_integer ($ PageCount ))
{
Print ("$ PageCount is an integer "."
");
}
// Object judgment
Class widget
{
Var $ name;
Var $ length;
}
$ Thing = new widget;
If (is_object ($ thing ))
{
Print ("thing is an object "."
");
}
// Character judgment
$ Greeting = "Hello ";
If (is_string ($ Greeting ))
{
Print ("Greeting is a string "."
");
}
?>
Http://www.bkjia.com/PHPjc/319464.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/319464.htmlTechArticleHTML HEAD TITLEphp commonly used numerical judgment function/TITLE/head body? // Determine the array $ colors = array ("red", "blue", "green"); if (is_array ($ colors) {print ("colors is an array ". "br ");}...