Definition and usage
The end () function points the array's internal pointer to the last element and returns the value of the element, if successful.
Grammar
End (Array) parameter description
Array required. Specifies the array to use.
Example
Although it is known that this parameter means "People's Republic of China", but the official document does not have such parameters, only Asia/shanghai, Asia/hong_kong and so on these parameters ah, why here can be set to RPC, which is the point of
Copy CodeThe code is as follows:
/*** Viewer Mode** Defines a one-to-many dependency between objects so that all objects that depend on it are notified and automatically refreshed when the state of an object changes* Ability to conveniently
Recently in the study of their love scarf to calculate the number of days of love, which requires PHP based on the daily date of calculation, the following talk about the implementation of this date calculation of several methods:
(1) It's easy if
Copy the Code code as follows:
Open File$fp =fopen (' tmp.html ', ' R ');Reading the contents of a file can be done with the following two functions Fread,file_get_contents$str =fread ($fp, FileSize (' tmp.html ')); FileSize to get file
Copy the Code code as follows:
namespace Bak\ba\ba;Function Bab () {echo "BI";}namespace KKK;function K1 () {echo "K1";}\bak\ba\ba\bab ();//Use a different namespace under the KKK namespace, note the previous \Use \bak\ba\ba as b;//is still under
1.1 First PHP
Copy the Code code as follows:
My First PHP Program
echo "Hello everybody!";?>
Additional: Use of the phpinfo () function
1.2 Input PHP Script
1.2.1 To mark PHP code paragraphs
1.2.2 Statements and comments
/* */
//
#
#
1.2.3 PHP
Code optimization
Copy the Code code as follows:
for ($i =0; $i Array_push ($week, $arr);}
Copy the Code code as follows:
for ($i =0; $i $week []= $arr [$i];}So there's no extra burden on the calling function.
The advantages and
1. To optimize the query, avoid full-table scanning as far as possible, and first consider establishing an index on the columns involved in the Where and order by.
2. Avoid null-valued fields in the WHERE clause, which will cause the engine to
1, the first is the bootstrap process, the resources used in the initialization program
2, create a Zend_controller_front entity that implements the front controller pattern, which is responsible for dispatching the HTTP request to the appropriate
You can refer to this article below http://www.jb51.net/article/6488.htm
SQL: $SQL = "Delete from ' doing ' where ID in (' 1,2,3,4 ')";
Data is separated by commas.
Form:
Copy the Code code as follows:
Good $id_dele=$_post[' Id_dele ' will be
But we can replace it with a regular:
Copy the Code code as follows:
function Dhtmlspecialchars ($string) {if (Is_array ($string)) {foreach ($string as $key = = $val) {$string [$key] = Dhtmlspecialchars ($val);}} else {$string = Preg_replace ('
The related setting is to modify the Date.timezone parameter in php.ini:
[Date]
; Defines the default timezone used by the date functions
;d Ate.timezone =
The default is off, just remove the comment, you can
[Date]
; Defines the default timezone
Organize out 2 to learn from everyone
1, three equals sign and two equals sign difference "= = =" VS "= ="
For example, you'll get a function that returns these kinds of situations:
1, more than 0 of the number
2, less than 0 of the number
3, equals
The solution on the net said after crawling with Iconv () transcoding. Look after I feel that something is wrong: one is not necessarily compiled Iconv library, the bigger problem is that the encoding is the same as the time of the stream conversion
Sort out the post and get differences and list here:
Security:
Get transmitted data is visible, and security is poor.
Capacity to transmit data:
Get transport is limited by the maximum URL length, and the HTTP protocol does not
The best tool for managing MySQL database is phpMyAdmin, now the latest version is phpMyAdmin 2.9.0.2, an international open source software that has been updated and you can download it from the Http://www.phpmyadmin.net official website , the
First step: Getting Started
How do I use Phpbean for route forwarding? Here is a simple example of use.
First of all, index.php is a single entry for the program, mainly for routing and forwarding work. The program code for index.php is as follows:
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