PHP substr () function parameter description and usage example, substr parameter description
The examples in this paper describe the substr () function parameter description and usage in PHP. Share to everyone for your reference. Specific as
Substr(PHP 4, PHP 5)
substr-returns a substring of a string
DescriptionString substr (string $string, int $start [, int $length])Returns a substring string string that is specified by the start and length arguments.
Parameters
String
The input
This article mainly introduces the description and usage of substr () function parameters in php, analyzes the meaning of each parameter in substr () function in the form of an instance, and illustrates its usage, for more information about substr ()
PHP uses substr () to intercept strings. what should I do if Chinese characters are garbled ,. In PHP, how to use substr () to intercept strings with Chinese garbled characters? in PHP program development, string truncation operations, such as
The younger brother not to tidy up the use of substr function, do a few examples to solve the confusion of the new, master please drift over.
Let's take a look at the syntax of the PHP substr function:
String substr (string string, int start, int
PHP substr function string truncation usage analysis, phpsubstr. Analysis on the use of substr function string truncation in PHP. phpsubstr this article describes the use of substr function string truncation in PHP. For your reference, we will share
However, as long as the character string appears Chinese characters, it may cause PHP substr Chinese garbled characters, because of the Chinese UTF-8 encoding, each Chinese character occupies 3 bytes, while GB2312 occupies 2 bytes, English occupies 1
SUBSTR---get some stringsSyntax: String substr (string string, int start [, int length])
Description
SUBSTR () returns a portion of a string, specified by the parameter start and length.
If start is a positive number, the returned string will start
Php tutorial substr () function parameter description and example tutorial/*String substr (string $ string, int $ start [, int $ length]), which can be used to search for matched strings or characters in a long string. $ String is the string to be
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.