Conditional statement
When you write code, you often need to perform different actions for different judgments.
You can use conditional statements in your code to accomplish this task.
If...else statement
Executes a piece of code when the
Copy Code code as follows:
?
Start Snipit 1
$sql = "SELECT * from ";
$result = mysql_query ($sql);
while ($row = Mysql_fetch_assoc ($result)) {
Do stuff with $row
}
Mysql_data_seek ($result, 0); The point is, here.
while
The following text is due to the younger brother to see the recent forum on such a lot of questions and write, but also ask you to give more advice!!!
In the FAQ on this site has been how to remove some of the PHP4 of redundant information solution,
The PHP bundled Pdflib library may be the best Web publishing platform. A pair of typical usage: Demand BrochureE-commerce Shipping list With this guide, you can learn how to use the PDF extensions in PHP4 to create PDF documents.We also focus on
Timely delivery of applications is the key to determining what technology the solution is using, with the help of the pear (PHP Extension and application repository:php extension and application Library), which greatly facilitates its development
P> eyes without hate GBK Unicode UTF8 Kanji Conversion
The conversion of Chinese characters in PHP has always been a tricky business.
The class has four filters "[dec];", "& #x [hex];", "%u[hex]", "UTF8 conversion"
Easy to use, but also can
The error level is set to: error_reporting (E_all | e_strict);
The array variable is not defined and will also report an error, but sometimes it really doesn't need to be reported, the PHP tutorial solution is:
@$_get[' Unkown '];
This will allow
Problem:
A lamp server running on line, PHP does not support iconv functions.
Workaround:
Install LIBICONV, recompile Apache, enable PHP to support Iconv functions, implement UTF-8 and gb2312 encoded conversions.
Specific steps:
1, download
This article describes the way php reads a text file and prints out the most characters and the number of times the row is used. Share to everyone for your reference, specific as follows:
Test.txt file:
Welcome to our website jb51.net
www.jb51.
MD5 () encryption algorithm
Mode: One-way encryption
Syntax: MD5 (string $str [, bool $raw _output = false])
$STR: Raw String
$raw _output: If the optional raw_output is set to TRUE, MD5 Digest will return in its original binary format in
As a result of the project needs, access to sesame Credit to the user certification, open Sesame Credit official website (https://b.zmxy.com.cn/index.htm) to view the official demo, in the document see as shown
Instantly feel this official demo
In addition to the call function of the front desk, Ewebeditor has a strong background management function, and can make various kinds of effective customization for the editor, as follows:Excel sheet Import (V4.3)Ewebeditor provides the latest
Domestic PHP Open Source Blog magike v1.1.0 official version
First of all, thank you to participate in this open source program test, we have received a lot of useful information, hope to provide you with a community open source mode of development,
One, for the PHP page completely inaccessible situation
1, to confirm that the problem is PHP or IIS and other server issues
Judging method, in the directory to decentralize a static file, through the browser to determine whether the static file
First, download
Find the complete Memcache Windows Installer package and unzip it on your hard drive, such as F:\memcached.exe
Second, the installation
WIN7 64-bit double hit Open this exe may only have an empty window, can not enter any command,
A small program that uses PHP to open the socket port directly for a letterThe feature is the use of SMTP authentication, can better use to meet the needs of general users to build stations.
The entire source code attached to this article, the same
Example of the function of retrieving the drop-down tree from a database using PHP + mysql
This example describes how to obtain the drop-down tree from a database using PHP + mysql. We will share this with you for your reference. The details are as
Php provides the system (), exec (), passthru () functions to call external commands.Their differences:System () outputs and returns the last shell result.Exec () does not output results. The last shell result is returned. All results can be saved
1. Introduction to PDOPDO is short for PHP Data Object. It defines the abstract layer for database access and unifies Access interfaces of various databases. PDO has the following features:Encoding consistency: PDO supports multiple database
Before the function, the error message is not displayed.The preceding "@" can suppress the error, that is, it will not display the error, and then throw an exception to display the exception processing defined by itself. This is only added to
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