PHP Array_chunk () function
Definitions and usageA series of array_chunk () functions splits into a new array.
Grammar
Array_chunk (Array,size,preserve_key) Parameter Description array Required. Specifies the array to use size Required.
On the previous page I began to explain the importance of object-oriented and how to create a basic object. We will finalize a lot of details here and now.class variables and visibilityIn class, we first determine our variables. In this case, our
Okay, now let's look at the program code for the login.php file.
Session_Start ();Include ("global.php");if (isset ($_post[' username ')) && isset ($_post[' pwd ']){$result = mysql_query ("SELECT * from Xx_admin");if ($info = mysql_fetch_array
if ($submit){if ($chkme){printf ("You have selected checkbox");}Else{printf ("You did not select a CheckBox");}}Else{?> Test Submission " method=post> Choose Me}?>
Object assignment and copying: value assignment: reload using the "=" operator The code is as follows:Copy code User a (10), B;B =;Copy: Call the copy constructor.User B;User a (B );OrUser a = B; // equivalent to User a (B ); The difference
1. strstr-first appearance of the search stringString strstr (string $ haystack, mixed $ needle [, bool $ before_needle = false])Note 1: $ haystack is the string and $ needle is the string to be searched. This function is case sensitive.Note 2: The
& This is a bitwise AND operator.& OperatorView and instance $ A = 11;$ B = 7;Printf ("% B & % B = % B", $ a, $ B, $ a & $ B );// Output:// 1011 & 111 = 11// Check again & instanceIf (TRUE & TRUE)If (1 & 0 = 0)Print "TRUE! ";// TRUEOriginal
Syntax: Boolean switch Directory (string directory) dirDirectory Changes to. Changes current working directory.Returns true upon success. If an error occurs, FALSE is returned.ExampleIf (chdir ("upload ")){Print "Changed current directory
Php imagecolorallocateImagecolorallocate-assign a color imageInt imagecolorallocate (resource $ image, int $ red, int $ green, int $ blue)Returns the color of a given RGB component.Imagecolorallocate () must be called to create each color, which
Zend_version(PHP 4 and PHP 5)Zend_version-the obtained version of the current Zend engineDescriptionString zend_version (invalid)Returns the version of a string that is currently running the Zend Engine.Return valueReturns the Zend Engine version
Extract(PHP 4 and PHP 5)Extract-import to the current variable symbol table from an arrayDescriptionExtract (array $ var_array [Abstract $ extract_type = EXTR_OVERWRITE [, string $ prefix])Imports an array of variables to the current symbol
In_array(PHP 4 and PHP 5)In_array-check whether an array of values existsDescriptionBoolean in_array (mixed $ needle, array $ heexke [, Boolean $ strict])Search for the needle of heatake.ParametersNeedleThe value to be searched.Note: If the needle
Array_map("= 4.0.6, PHP 5" in PHP 4)Array_map-array of considerations for various elements of callbackDescriptionArray array_map (callback $ callback, array $ arr1 [, array $...])Array_map () returns all content contained in an array. The callback
Array_unshift(PHP 4 and PHP 5)Array_unshift-Prepend the beginning of one or more elements, an arrayDescriptionInternational array_unshift (array & $ array, mixed: $ var [, mixed $...])Array_unshift () prepends uses the front array of elements. Note
Php_ini_loaded_file("= 5.2.4" in PHP 5)Php_ini_loaded_file-the retrieval path loads the php. Ini file.DescriptionString php_ini_loaded_file (invalid)Check if the php. Ini file is in and retrieve its path.ParametersThis function has no
Parameter or set_time_limit(PHP 4 and PHP 5)The parameter or set_time_limit-limits the maximum execution time.DescriptionInvalid parameter or set_time_limit (seconds)Set the number of seconds for the script to run. If this is done, the script
Umask value(PHP 4 and PHP 5)Umask-changed the current umaskDescriptionInterpreted umask ([International $ mask])Set the umask value of PHP to mask and 0777, and return the old umask. When PHP is used as a server module and umask is restored, each
Filesize(PHP 4 and PHP 5)Filesize-get the file sizeDescriptionInternational filesize (string $ file name)Obtain the file of the specified size.ParametersFile nameFile path.Return valueThe size of the returned file is in bytes, or FALSE (and the
Chgrp(PHP 4 and PHP 5)Chgrp-change the file GroupDescriptionBoolean chgrp (string $ file name, mixed $ group)Filename Group of the archive that attempts to change the group.Only the Supervisor can change any file in the group. Other users may change
$ Link_id = mysql_connect ("localhist", "root", "qwaszx") or die ("connection failed! ");If ($ link_id){Mysql_select_db ("my_test ");If (! $ _ GET [id]) {$ Result = mysql_query ("select * from userinfo ");Echo " No. user name Gender age
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service