First, let's look at an example:
The code is as follows
Copy Code
$a = "Hello Springload";$b = $a;Unset ($b);echo $a; Hello Springload?>
This is clear to us, unset ($b), just disconnected the variable name and
This article mainly introduces PHP using unset () to delete a cell (key) in the array method, example analysis of the unset function in the deletion of the array unit of the use of skills, the need for friends can refer to the
This example
The PHP built-in function memory_get_usage () returns the amount of memory currently allocated to the PHP script in bytes (byte). In the actual development of the web, these functions are very useful, and we can use it to debug PHP code performance.
1. Adding array elements
PHP is a weak type language, which means you don't need to display an array and its size, instead, you can declare and populate the array at the same time. If you are working on a digital index array, you may want to use
The concept of an array
Array is a very important concept in PHP, we can think of arrays as a set of similar data, in fact, the array is an ordered graph.
PHP also provides more than 70 built-in functions to manipulate the array.
Create an array
This article mainly introduces PHP from the array to remove elements of the four methods of the example, small series feel very good, and now share to everyone, but also for everyone to do a reference. Let's take a look at it with a little
Looking at the PHP manual, I found the following code:
Copy Code code as follows:
function Test ()
{
static $count = 0;
$count + +;
Echo $count;
if ($count Test ();
}
$count--;
}
?>
The results of the
The PHP session variable is used to store information about user sessions, or to change settings for user sessions. The session variable holds information that is a single user and is available to all pages in the application.
Understanding: Session
Some people say that PHP's unset does not really release memory, some say, PHP unset only in the release of large variables (a large number of strings, large arrays) when the real free memory, but also said that in the PHP level to discuss memory is
工欲善其事, its prerequisite. In the process of developing xblog, a little bit of laravel thought was realized. Indeed, after reading this article you may not be able to write a blog from scratch, but after you know the core concept of laravel, when you
The PHP built-in function memory_get_usage () returns the amount of memory currently allocated to the PHP script in bytes (byte). In the actual development of the web, these functions are very useful, and we can use it to debug PHP code
Tenth chapter (3) Upload multiple files and file download processingContinue: Used in a loop structure to skip the remaining code in this loop and start the next loop.For more information, see PHP video.
DatabaseQuery statement:SELECT field name
1. Adding array elementsPHP is a weak type language, which means you don't need to display an array and its size, instead, you can declare and populate the array at the same time.
The code is as follows
Copy Code
1, add elements to the array
PHP is a weakly typed language. Therefore, you do not have to declare the length of the PHP array as the C language. The process of adding elements to them is also the process of declaring and initializing them.
In the process of developing using PHP, sooner or later, you will need to create many similar variables, at which point you can store the data as an element in an array. The elements in an array have their own IDs, so you can easily access them.
When you run an application, you open it, make some changes, and then close it. It's like a conversation. The computer knows who you are. It knows when you start the application and when it terminates. But on the internet, there is a problem: the
Session variable ($_session): The data produced by the PHP session function is stored in the $_session variable in the form of a super global variable.
1. Introduction to Session
Sessions are also called session periods, which are small pieces of
One advantage of the php object is that you can use magic methods that override the default behavior of a class without having to modify the external code, which makes the PHP syntax less redundant and more extensible. These methods are well
1. $_request,$_post,$_get in PHP and contact _2015_1025 2. mysql_php study notes _2015_0907_php use small summary
2.1. Enable the PDO object to throw a pdoexception at any moment when the task is not successfully executed
After a
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.