#数组# #一: definition of an array1. An array is an ordered set of values2. Each value is called an element3. Each element has a position in the array, expressed as a number, called an index. The index starts at 0.# #二: Features1. The elements of an
In real life, we often encounter this kind of problem: in a collection, who is the biggest element? Who is the smallest element? Or who is the second-small element? Wait a minute. So how to solve this kind of problem in a short time, is the article
One:1. Two functions commonly used in JavaScriptAlert ("Popup a Hint box");document.write ("Output content to browser")alert("今天德国大胜吗?") ;向浏览器输出内容document.write("今天天气不错!!") ;2.关于JavaScript的变量的定义 var 变量名= 值; 注意:
In the process of doing the project, we often need to filter some HTML tags to improve the security of the data, in fact, is to remove those potentially harmful to the application of data. It is used to remove labels and to delete or encode unwanted
If you are designing with Dreamweaver or FrontPage, then unless you deliberately delete them, they all exist. Let's do it step-by-step and improve the search engine in the project.
First, design a search formBuild a search.htm in the root
This article for everyone to share the basic knowledge of PHP array functions for your reference, the specific contents are as follows
Array arrays are very important data types. It is more like a structure than other data types, and the result
Copy Code code as follows:
/**
* One-yuan word segmentation algorithm
* UTF8 encoded next character if the first character ASCII code is not greater than 192, it only occupies 1 bytes.
* If the first character ASCII code is greater than 192
Select ObjectThe Selection object is an HTML form in a Drop-down list.For each individual the HTML tag of one form, the creation of a select object.You can access the contents of the object's selection search [] array form, or by using
This section of the database connection class, he will automatically load SQL anti-injection function, filtering some sensitive SQL query keywords, but also can increase the Judgment Field Show table status of nature and Show table class to get all
In PHP, the TRIM function can only replace the left and right sides of the space, feeling in some cases not very good, if you want to be a string of all white space characters filter out (spaces, full-width spaces, newline, etc.), then we can write
Sometimes you need to filter out the extra tag attributes, such as the IMG tab that filters out all attributes except the SRC attribute, such as deleting titile alt attributes and some of the foot onclick properties.
For example, to filter all
Example 1
The code is as follows
Copy Code
function In_array (Stringtosearch, Arraytosearch) {for (s = 0; s Thisentry = Arraytosearch[s].tostring ();if (thisentry = = Stringtosearch) {return true;}}return false;}
ASP function code
Copy Code code as follows:
Function removehtml (str)
Dim objRegExp, match,strhtml
If IsNull (str) Then
Str= ""
End If
Strhtml=str
Strhtml=replace (replace (STRHTML,VBLF, ""), vbcr, ""), vbCrLf, "")
We can see an example of what I've done.
The code is as follows
Copy Code
CREATE TABLE IF not EXISTS ' Think_form ' (' ID ' smallint (4) unsigned not NULL auto_increment,' title ' varchar (255) Not NULL,' Content '
Ccterran (original)
Author: iwind
Friends with Dreamweaver do a website, 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
Str_replace
(PHP 4, PHP 5)
Str_replace-replace all occurrences to the search string with the replacement string
DescriptionMixed Str_replace (mixed
$search, mixed
$replace, mixed
$subject[, int
&$count] )
This function returns a string or "an
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.