This tutorial is about the difference between a do and a while when the loop is commonly used in PHP programming, while when the condition is true and the do is executed at least, let's take a look at
do {
}while (condition)
Look at the example
PHP fopen Instance Tutorial
In the past lessons, we used the feature to open to create a new file. In this lesson, we will enter into the details of this important function to see what it offers.PHP-A different way to open a fileFor many different
Suppose you have an associative array to iterate through. PHP provides an easy way to use all the elements of the array with the foreach statement.In plain English This statement will do the following:Executes this code for each project in the
PHP functions PHP functions are important in PHP and are often used, so let me focus on the use of function. Let's take a look at some examples of Jane.
function is a name that we give a code block that can be executed when we need it. This may not
PHP var_dump function is to determine the type and length of a variable, and output the value of the variable, if the variable has a value of the variable value and return data type.
Look at the Var_dump syntax:
Var_dump (Var,var,bar);
Let's take
PHP File Upload move_uploaded_file
Create an upload file formIn order for the user to upload the file form can be very useful.Take a look at the following HTML form file upload:
Filename:
Please note the following HTML
PHP Switch Statement
The switch statement in PHP is used to perform one of several different actions based on several different conditions.Switch statementIf you want to select a lot of blocks the code will be executed using the switch to
Php htmlspecialcharsWhen developing programs, users often encounter html injection input by customers or Netizens. php provides a professional function to handle this situation, htmlspecialchars.Htmlspecialchars (string, int quote_style, string
Get_defined_constants("= 4.1.0, PHP 5" in PHP 4)Get_defined_constants-returns an associated array name for all constants and their valuesDescriptionArray get_defined_constants ([Boolean $ category])Returns all the currently defined constants of the
Next(PHP 4 and PHP 5)Next-advance the internal array pointer arrayDescriptionMixed next (array & $ array)The Future () behavior is like the current (), which is different. It promotes a place of the internal array pointer and then returns the value
Array_rand(PHP 4 and PHP 5)Array_rand-select an array of one or more random entriesDescriptionHybrid array_rand (array $ input [Abstract $ num_req = 1])Array_rand () is quite useful when you want to select an array of one or more random
Array_count_values(PHP 4 and PHP 5)Array_count_values-count all array values are the sameDescriptionArray array_count_values (array $ input)Array_count_values () returns the value used by an array, the input key and the input value of its
Array_flip(PHP 4 and PHP 5)Array_flip-array of organic codes and their related values of the exchangeDescriptionArray array_flip (array $ Cross)Array_flip () returns the inverted order in an array, that is, the key is converted into the value
Array_fill_keys("= 5.2.0" in PHP 5)Array_fill_keys-enter the value in an array and specify the keyDescriptionArray array_fill_keys (array $ KEY, mixed $ value)Fills in a series of value parameters and makes use of the key array of
Curl_init("= 4.0.2, PHP 5" in PHP 4)Curl_init-initialize a curl meetingDescriptionResource curl_init ([String $ url = zero value])Initialize a new meeting and return a curl processing for the curl_setopt (), curl_exec (), and curl_close () functions.
Base64_decode(PHP 4 and PHP 5)Base64_decode-base64-encoded MIME of the decoded dataDescriptionString base64_decode (string $ Data [, Boolean $ strict = false])Decodes BASE64 encoded data.ParametersDataEncoding data.StrictReturns FALSE if the input
Parse_url(PHP 4 and PHP 5)Parse_url-parse the URL and return its componentsDescriptionHybrid parse_url (string $ URL [Abstract $ part =-1])This function parses a URL and returns a URL with an associated array containing all components. There are
File(PHP 4 and PHP 5)File-read the entire file to an arrayDescriptionA series of files (string $ file [Summary $ flag = 0 [, resource $ background])Read the entire file to an array.Note: You can use file_get_contents () to return the file content as
File_put_contents(In PHP 5)File_put_contents-write a string to a fileDescriptionInternational file_put_contents (string $ file name, mixed $ Data [Summary $ flag = 0 [, resource $ background])This function requires the fopen () function, fwrite ()
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