Mainly in the development or learning of some of the experience of skills to summarize, mainly to solve a certain thing better way to tell you.
1, if you use echo to output a simple statement, similar to the following:
echo "Hello world!";?>
Then
Search engine Friends made a website with Dreamweaver, there is no dynamic content, just some personal collection of articles, personal introduction and so on. Now the content is more, want to ask me to help him to do a search engine. To be honest,
This class can build a MySQL query with an array of parameters.
This class can create SELECT, INSERT, UPDATE, and DELETE statements from the specified table and field parameters.
This class can create a where condition for an SQL statement, like a
Find the maximum and minimum problem descriptions in the arrayFor an array of n integers, how many times do you need to compare the maximum and minimum numbers to find out?Analysis and solution of "solution one"You can think of the maximum and
Two-dimensional array
Function search ($ keyWord, $ stack) {// click here to determine whether to update or insert
Foreach ($ stack as $ key => $ val ){
If (in_array ($ keyWord, $ val )){
Return TRUE;
}
}
Return FALSE;
}
Multi-dimensional
This article provides a detailed analysis of the efficiency of strtr, str_replace, and preg_replace functions. For more information, see the source code of strtr, now we can compare the efficiency of strtr, str_replace and preg_replace:
The code
This article mainly introduces a simple and practical php database class for mysql operations. it not only contains common php operations for mysql databases, but also contains the filtering function for dangerous characters, it is very practical.
The comparison between POSIX and Perl-compatible regular expressions (preg_match, preg_replace ,. First, let's take a look at the POSIX regular expression's two main functions: ereg function :( regular expression matching) format: intereg
This article describes how to use arrays to replace matching items in strings in PHP. For more information, see the following SQL statement:
select * from table where ctime >= '[date-14]' and ctime
You want to replace the dates represented by
Php mona1 word segmentation algorithm
The code is as follows:
/**
* Mona1 word segmentation algorithm
* UTF8: encode the next character. if the first ASCII code is not greater than 192, it only occupies 1 byte.
* If the first ASCII code is greater
Strip_tags extended function-processing html (for collection)
Strip_tags extended function-processing html (for collection)
/*** This function turns HTML into text * converts html to txt */function html2txt ($ document) {$ search = array ('@
]
Find a positive expression and find a positive expression to replace & lt; ahref & quot; www.baidu.com.com & quot; & gt; baidu & lt; a & gt; the baidu outside the tag in the above string is & lt; B & gt; baidu & lt; B & gt; ------ solution ----------
This article mainly introduces four RBAC usage methods in ThinkPHP, and analyzes common usage of Logon controllers and public controllers in detail, which has some reference value, for more information, see
This article mainly introduces four RBAC
Thinking logic of computer programs (13), thinking Logic
Class
In the previous section, we introduced the basic principles of function calling. In this section and the next sections, we will explore the world of classes.
Programs mainly involve data
The use of the array of data structures is nothing more than adding and removing the operation, on the ordered array and unordered array for these three operations:First, find(1) Unordered array finds specific elements, linear lookup:1 Public
Php array common functions, php Array
1. Common sorting functions of php arrays.
Sort ()-sort arrays in ascending order
Rsort ()-Sort arrays in descending order
Asort ()-Sort joined arrays in ascending order by value
Ksort ()-Sort joined arrays
In php, the built-in strip_tags function is provided for converting html to text, but sometimes this function is not enough. The following summarizes some user-defined functions for your reference.
The most commonly used php function strip_tags
PHP in_array implicit conversion solution, phpin_array
Problem
When writing an interface today, You need to input a large number of basic information parameters, which are int and string types. For convenience of verification, I plan to put all the
C # Binary Search
///
/// Binary Search///
///
Array
///
Start index 0
///
End Index
///
Object To be searched
///
Index location of the object
Public static int BinarySearch (int [] arr, int low, int hight, int key)
{
Int mid = (
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.