[Code]php Code:
Header ("content-type:text/html; Charset=utf-8 ");
/**
* Converts a string into binary
* @param type $str
* @return Type
*/
function Strtobin ($STR) {
1. List each character
$arr = Preg_split ('/
2.unpack characters
In the PHP development process, we sometimes encounter the situation of the form is not fixed, need to be in the process of running the program dynamically generated, here to share a PHP automatically create a form of the class to everyone
form.php
This article mainly introduces the use of PHP magic methods, this article explains the __get, __set, __call, __callstatic, __tostring, __invoke, such as the use of magic methods, the need for friends can refer to the
①__get/__set: Takes over the
What is a good PHP programmer to do? What skills should you have to be a PHP programmer? What is your skill level? This article will list some things that you should know as a PHP programmer.
MySQL Ability
The application in development is based
A good source code such as DZ's Forum, Wind Forum, Imperial Cms,dedecms and so on, have their own set of design ideas and design patterns, so before looking at a product to be prepared psychologically, you can compare their experience with these
This article mainly introduced the PHP date function commonly used time processing method, this article introduced obtains today, tomorrow, yesterday, one week, one months ago, one months after time method, needs the friend to be possible to refer
This article is a PHP delete HTML tag Implementation code for a detailed analysis of the introduction, the need to friend reference under the
copy code code as follows:
/*** Remove HTML tags** @access Public* @param string str* @return
The examples in this article describe how many days PHP can calculate to a given date. Share to everyone for your reference. Specifically as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23-24
function Countdays (
Today, a friend of mine asked me a question. PHP traverses the array method and tells her a few. By the way, write a summary of the article, if the summary is not fully also asked friends to point out
First, foreach ()
foreach () is the simplest
This article mainly introduces the PHP statistical value array in the frequency of the most frequent 10 numbers of methods, involving PHP array_count_values and Arsort and other methods related to the use of skills, very practical value, the need
This article mainly introduced PHP to find a numerical array of not repeat the largest and smallest 10 number of methods, involving PHP Array_unique and Array_slice method of using the technique, very practical value, the need for friends can refer
This article mainly introduces the PHP from the string creation function method, involves in the PHP string and the Create_function function use skill, needs the friend to be possible to refer to under
This example describes how PHP creates a
This article mainly introduced the PHP to remove the 2 methods of the trailing space, this article has given the preg_replace substitution, the trim function two kinds of methods and has given the example, needs the friend to be possible to refer to
This article describes the JavaScript in the direct writing of PHP code method, the need for friends can refer to the
First, embed PHP code in javascriptJavaScript is included in the JS file, then the JS file can also write directly PHP code, but
The regular GBK of Chinese characters under the code
1. Judge whether the string is all Chinese characters
The code is as follows
$str = ' All is Chinese character test ';if (Preg_match_all ("/^ ([X81-xfe][x40-xfe]) +$/", $str, $match)) {Echo '
This article mainly introduces the PHP calender (Calendar) code, the need for friends can refer to the The code is as follows: code is as follows: HTML; return $html; } /** * * detection is a 32-bit machine * @Author Fc_lamp * @blog:
If your site or blog has an inline Facebook page, you might want to know how many fans you have. This code will help you check the number of Facebook fans, remember, and don't forget to add the code to the second line of your page ID. The code is
Tonight, when writing a form validation class for a framework, you need to determine whether a string length is within a specified range, and naturally, think of the strlen function in PHP.
The code is as follows
$str =
This article mainly introduced in PHP to save an object to the session of the method, involving PHP operating objects and session skills, with a certain reference value, the need for friends can refer to the
-->
This example describes how to save
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