This section describes how to use a custom function to convert a number to a currency format. For more information, see this function.
The Code is as follows:
Copy code
Function format_money ($ STR){If ($ STR = ""){Return "";}
This article introduces three commonly used date and time comparison functions, one is for the whole date, the other is for the time comparison only, and the last is for the professional comparison time difference to seconds.
The date comparison is
This article introduces a more practical article about how php performs intra-site search and highlights keywords. Many friends use preg_replace directly, which is correct, however, I think using str_replace is faster. Check the differences between
Php obtains the implementation code of the content between specified characters. This is a substring used to obtain the content between two substrings in a string. For example, it obtains the hzhuti substrings from the string www.hzhuti.com, let's
The following describes how to randomly generate a set of non-repeated number implementation code in two PHP programs. For more information, see.
The Code is as follows:
Copy code
/*** PHP obtains a set of random numbers
I recently developed a Discuz! Plug-in. Today, I encountered a problem. When I call the variable data of the plug-in a function in the background, a null value is returned. After several tests, I suddenly remembered that it was caused by not loading
We want to write a paging program for the native article content. The principle is very simple, that is, we insert a paging character in the editor during editing, and then we can directly use explode Paging for display, of course, it is more
I have mentioned how to generate a random password. Next I will introduce some common functions for generating random strings. These are our custom functions. Of course, there are also built-in functions, however, it is relatively simple.
Mt_rand
/*+ ------------------------------------------------------------------------------- +| = Read this article for Haohappy | = Notes in the Classes and Objects chapter| = Translation-oriented + personal experiences| = Do not repost it to avoid
MySQL tool for data migrationMySQL provides several client tools and utilities. The most common ones are: mysql-an Interactive Client program, you can publish a query to the database and view the results mysqldump-this tool can extract the
First, let's take a look at two extraordinary characters: '^' and '$'. They are used to match the start and end of the string, respectively."^ The": matches strings starting with ";"Of despair $": match the string ending with "of despair;"^ Abc $":
The object-oriented program is built through the layered structure of the class. In a single repeated language such as PHP, the class continues to be tree-like. A root class has one or more sub-classes, and then one or more sub-classes continue from
The mt_rand (int $ min, int $ max) function is used to generate a random integer. $ min-$ max indicates the ascii code range. Here, 33-126 is used. You can adjust the range as needed, for example, the-characters in the ascii code table correspond to
The following uses preg_match to show two instances. One is to get the content of the specified region, and the other is to get the url address in the content.
The following uses preg_match to show two instances. One is to get the content of the
Php tutorial image processing function imagetypes () imagecreatetruecolor () imagecreate ()// Determine whether the current gd library supports png
If (imagetypes () & img_png)
{
Echo "png support is enabled ";
}
Else
{
Echo "png support is
This article condenses the usage of various php functions to remove array elements by specified element values. If you need them, refer to them.
Removes array elements based on specified element values
The Code is as follows:
Copy code
Today, I have installed the php environment on my new server, but the Error "Fatal Error: Allowed memory size of xxxxxx bytes exhausted" is displayed at runtime. The memory is insufficient, next I will introduce several solutions to these problems.
DATE_FORMAT (date, format)Format the date value based on the format string. The following modifier can be used in the format string: % M month name (January ...... December)% W name of the Week (Sunday ...... Saturday)% D indicates the date of the
Author: Jiang Yong http://idoorsoft.51.netIn the database application system, making full use of the functions of the database backend server can simplify the work of the client front-end, reduce the network load, and make the overall system design
I have tried SQL server 2000 enterprise and personal to solve the bug of updating or deleting the comparison condition in SQL 2 k descending index. :(View my replies for details:SQL server 7.0 does not have any problems. In SQL 2000 (enterprise and
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