When a database field is set to NULL, the phone side will return null by default, and if I want to make the phone return empty, I have to make a judgment.
1, if I want to let the mobile phone end is empty, do not judge, table field default should be
PHP 0 "" Null Maximum difference of empty
Reply content:
PHP 0 "" Null Maximum difference of empty
See: http://stackoverflow.com/questions/137487/null-vs-false-vs-0-in-php
The main area is type, two is in the comparison, the above answer, I
PHP is a loosely typed programming language, and it is an indispensable step in a function to examine the "type" of the passed parameter value and whether the value is null or NULL.
Type check
Starting with PHP5, PHP allows type
When a field in the database is set to Null, the mobile phone will return Null by default. if I want the mobile phone to return Null, I have to make a judgment. 1. if I want to leave the returned result blank on the mobile phone, I will not make any
As a qualified PHP programmer, some basic knowledge is necessary to know, such as the difference between 0 and empty, about this difference, the following through a few examples of simple analysis, in which the truth, imaginative achievement here,
Public open Platform Development---Public platform PHP interface vs. Java interface
Public open Platform Development---Public platform PHP interface vs. Java interfaceTechnical QQ Exchange Group: javadream:251572072---------------------------------
PHP removes null elements from the array (array_filter)
Ashamed to say, before the null value of the array is either strong write foreach or while, using these two syntax structure to delete empty elements in the array, the simple code is as
The life cycle of PHP
In a common webserver environment, you cannot start the PHP interpreter directly; This is typically initiated by Apache or other webserver, which loads PHP processing scripts that need to be processed (requested. PHP
Example code ..w.curl.html is as follows: (garbled !) {Code ...}
public function file_get(){ $file = file_get_contents('Curl.html'); iconv("ANSI", "UTF-8//IGNORE", $file); return empty($file) ? null : $file;
PHP Language Summary: Basic syntax type constant operator Process Control function class and object namespace super global variable garbage collection mechanism
1 Basic Syntax
*php Mark
echo "Hello World";
... more code
echo "last Statement";
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.