PHP removes null values from the array, and we can use PHP's own function array_filter ();
You can also use
Array_diff () function
array_diff-Calculating the difference set of an array
Description
Array
Array_diff
(array $array 1, array
Several experience records of PHP development Web site Program
I used to use PHP as a purely system programming script, starting from March to write a Web site for the first time, a little experience here to summarize.
One: Open the error display
statically called members must be defined as static (PHP5 only)
Tip: PHP 5 introduces the concept of static members, which is consistent with the internal static variables of PHP 4, but is used as a member of the class. Static variables are similar
PHP some powerful string processing function summary
List several forgotten in the PHP language but very powerful string processing functions, here is not the use of an example, interested friends can test themselves.
(PHP 4 >= 4.0.4, PHP 5)
1,
In a microblogging project, the release video needs to parse out the chain to get the video address information,
Using the PHP curl to get the content, the regular parsing.
Later the test found that the potato video can not be resolved, the others
Mysql_fetch_assoc? Get a row from the result set as an associative array
Mysql_fetch_row? Get a row from the result set as an enumerated array
Gets a row from the result set is this the first row or a random row in the result set?
Reply to
PHP How to implement multidimensional array to string, multidimensional array to one-dimensional array of methods, PHP array and string conversion in the development process commonly used, very practical, learning PHP friends must see.
PHP
The Great God, "PHP from Getting started to mastering," where an array variable is passed by reference, simply passes the address of the first element of the set. Therefore, after exiting the function, only modifications to the first element are
Operating Environment: Window 64/php5.5+
Error description: Call to undefined function curl_init ()
Workaround:
1, in the online search for half a day, Google Baidu are used, what changed php.ini configuration file to open Curl extension, change
$OLDARR = Array (' A ', ' B ', ' C ', ' d '), Array (' A ', ' B '));//Compose a new two-dimensional array with the following $newarray = Array (Array (' A ', ' a '), array (' a ' , ' B '), Array (' B ', ' a '), array (' B ', ' B '),....... array ('
PHP built-in function substr () can intercept a specified string, but it is only appropriate to intercept all English strings. If Chinese is present in the string, it is possible to cause garbled characters after interception, even in some scenarios,
Set autocommit = 0; Turn off auto-commit
Start transaction; Open a transaction;
---------------------......
Commit formally submit a transaction;
After commit, do you want to restore set autocommit = 1? I see no one else's case is restored, the
Windows8.1 under Wampserver2.5+composer to build Laravel5.1 environment and import phpstorm
Technical life is a toss-up process ...??????????????????????????????????????????????????
1.wampserver2.5 installation path and configuration:
Current
"; }? >]
If you traverse the D drive, it will be stuck for a long time due to too many files.
Is there any way to optimize it?
Reply to discussion (solution)
Reducing the scope of traversal is the only way to optimizeUse Glob or directory
Smarty data cache and template caching
What is a template cache?
Smarty will replace the template written in the Smarty syntax with PHP format for PHP parsing, PHP data and interface separation.
When we modify the template file every time, the
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