So there are two types of storage in the database (really not only, my application is two kinds), timestamp type I was saved as a string, this is more convenient.
The normal date type is saved as a date type.
This two PHP time to pay attention to,
Today we are going to tell you aboutYou can use->, if the property of an object contains an object, you can get the properties of the inner object using two-> operators. You can even place these expressions with double-referenced strings. In the
We are learning PHP, we may be a multidimensional array of PHP problems to be confused, the article here on the detailed introduction of PHP multi-dimensional array sorting principle. PHP also allows for more complex sorting on multidimensional
We are now in the site registration and other places often see you need to enter a verification code, it is the random numbers or symbols in the form of a picture in front of the user, and provide verification before using the relevant features.
We are doingListing 1. access/get.php
function get_user_id ($name)
{
$ DB = mysql_connect (' localhost ', ' root ', ' password ');
mysql_select_db (' users ');
$ Res = mysql_query ("Select ID from users WHERE login='"
1. If a method is static, make a static declaration of it. The rate of PHP code optimization can be increased to 4 times times.
2.echo is faster than print.
3. Use Echo's multiple parameters (meaning: a comma instead of a period) instead of a
We are passing thePHP Recursive Array Code:
Php
Ignore_user_abort ()///After the connection is interrupted (for example, to close the browser) continue to execute the following script until processing is complete.
We pass onListing G is an example of a PHP natural language ordering:
Php
$ Data Array"Book-5"); Sort ($data);p rint_r ($data);
Natsort ($data); Print_r ($data); ?>
It outputs the
PHP Common Syntax
1.PHP Get string length:
$ length strlen($str);
PHP Common Syntax 2.PHP determines whether a character is null:
if (! $str) {
echo "false"
We are beginners todayPHP array processing function array: Create a new array.
Array_walk: Lets the user customize the function to handle each element in the array.
Arsort: Sorts the values of the array from large to small.
Asort: Sorts the values
PHP is still more commonly used, so I studied the PHP database file, here to take out and share with you, hope to be useful to everyone. We will see an application in which each table is in a separate database. It is reasonable to do so in a very
In learning
php judgment array is empty one, for loop
The simplest and most straightforward method is to iterate through the array with a for loop. The array of known dimensions can be judged, but what if it is an unknown multidimensional array?
PHP
PHP has a lot to learn, here we mainly introduce the use of PHP session. In PHP development compared to the cookie,session is stored on the server side of the session, relatively safe, and not like a Cookie has a storage length limit, below we
Threads are the first thing we think about in the project, how to implement threads in PHP, and we'll look at the implementation of PHP threads here. Many PHP developers believe that because standard PHP lacks threading capabilities, the actual PHP
PHP is one of the languages we have always been concerned about, with the upgrading of PHP6, its function is also more and more powerful, we here on the core content of PHP detailed introduction. PHP Core developer Andrei Zmievski in the keynote
For beginners, peopleDescription of array preg_split (string $pattern, string $subject [, int $limit [, int $flags]])
Returns an array that contains the substrings in the subject that are split along the boundary that matches the pattern.
If limit
Everyone is passing the
upload file code:
>
HTML xmlns="http://www.w3.org/1999/xhtml">
Head >
Meta http-equiv="Content-type" Content="text/ html charset=gb2312 " />
title > Document Upload
What we are bringing to you today is aboutThe specific code is as follows:
php
/**
* My file Upload class
*
* Unfinished Features:
* 1. The determination of the existence of the target directory
* 2.
In the study ofSystem: Linux PHP4 oracle8i
--title, name and other fields in the storage processing (go to the blanks)
function Trans_string_trim ($STR) {
$ Str = Trim ($STR);
$ Str = Eregi_replace ("'", "" ", $str);
We are learningFor example, the range () function can quickly create arrays of numbers from 1 to 9:
Php
$ numbers = Range (1,9); Create an array of 1~9 with a range of 9 numbers directly, ending with "1"
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