CopyCode The Code is as follows: Echo
JS;
?>
Please click
Copy codeThe Code is as follows: $ Confirm = "Are you OK with this? "; // Define the information in the confirmation box$ OK _msg = "I'm OK! "; // OK Information$ Not_ OK _msg =
If the callback function is not provided, array_filter () deletes all entries in the input that are equal to false.
You can use this function to delete null elements in the array.
CopyCodeThe Code is as follows: // delete an element in the array
1. Learn PHP in one week
Ftp://ftp.cycu.edu.tw/CNA/Course/2004/0816_0820_PHP/videos/040816_PHP_1.wmv
Ftp://ftp.cycu.edu.tw/CNA/Course/2004/0816_0820_PHP/videos/040817_PHP_2.wmv
Array array_intersect (array array1, array array2 [, array...])
The array_intersect () function returns the intersection array of two or more arrays.
Array_intersect () returns an array containing all values that appear in the array of all other
During this time, I read the book "PHP and MySQL web development" and saw the str_replace explanation. I wrote a small note: Three of str_replace can be passed in using arrays, but the explanation is relatively simple, so I decided to test the
Install the GD library file before using basic image creation functions. If you want to create a function using JPEG-related images, you also need to install the jpeg-6b, and if you want to use the type 1 Font in the image, you must install
CopyCode The Code is as follows: $ Lenth = 19;
$ STR = "how to display only the first few words in a long news title, which is replaced? ";
Echo strlen ($ Str) ?>
copy the Code the code is as follows:
/* @ another method, using the ord ()
Code Reuse
Include ()
Require ()
These two functions are used to reference files. The difference is that when processing fails, include () generates a warning and require () is a dense error.
Include_once ()
Require_once ()
These two functions are
Regular Expression
There are two sets of regular expression function libraries in PHP. The two functions are similar, but the execution efficiency is slightly different:One set is provided by the PCRE (Perl Compatible Regular Expression) Library.
On the other hand, sometimes you can use a simple line
Code To solve a problem.
The following are some cool features that you may not have noticed:
Use the ip2long () and long2ip () functions to convert an IP address into an integer and store it
1. Purpose of this function: Remove repeated elements in the array and sort by key names
Function assoc_unique ($ arr, $ key ){
$ Tmp_arr = array ();
Foreach ($ arr as $ K =>$ v ){
If (in_array ($ V [$ key], $ tmp_arr )){
Unset ($ arr [$ K]);
}
Multiple Functions use the same name, but the parameter table, that is, the number of parameters or (and) data types can be different. Although the method name is the same during the call, however, the corresponding function can be automatically
// If the transfer parameter is directly assigned, garbled characters are generated!
CopyCode The Code is as follows: http_request.open ("Post", URL, true );
Http_request.setrequestheader ('content-type', 'application/X-WWW-form-urlencoded
And the data is HTML.
Code String, such:
Li Si
Article A long string of articles
When intercepting a DIV, you must intercept the content inside the DIV tag and keep the HTML Tag, only to process the text. For example, I may just intercept
The general idea is as follows: in order not to refresh the previous page, I used iframe to dive into a second-level subpage to read data in the database and finally pass the desired data to the parent page, select and transfer data.
The main
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