Home > Article > Backend Development > 5 recommended articles about length interception
This article mainly introduces the DedeCms custom field call length interception method. Friends in need can refer to it. For example, the called field is the test dedecms template download address: www.php.cn/xiazai/code/dedecms Method 1: Run the php method.. [field:test runphp=yes] @me= substr (@me, intercept bytes) [/field:test] Method 2: Call the built-in function method [field:test function='cn_substr(@me, intercept bytes)'/] The two methods are actually similar. The second method is more suitable for Chinese interception. Yes The effect of the built-in function encapsulated by dedecms is much better than the first one.. 1. Introduction to the two methods of intercepting the call length of DedeCms custom fields: This article mainly introduces the methods of intercepting the call length of DedeCms custom fields. Friends who need it can Refer to the following 2. A brief analysis of common operations of GridView in Yii2
1. Detailed introduction to custom fields
Introduction: This article mainly introduces the DedeCms custom field call length interception method. Friends in need can refer to the following. For example, the called field is test dedecms template download address: www.php. cn/xiazai/code/dedecmsMethod 1: Run the php method.. [field:test runphp=yes] @me=substr(@me, intercept bytes) [/field:test]Method 2: Call ...
2. Two methods for length interception of DedeCms custom field calls
Introduction: This article mainly introduces the DedeCms custom field call length interception method. Friends in need can refer to
##3. php code to intercept a string according to the specified length
Introduction: php code to intercept a string according to the specified length
4. Examples of php Chinese and English string length interception
Introduction: Before using this method, please enable the php_mbstring.dll extension in php.ini and change the ; Just remove the semicolon. There are many methods of intercepting Chinese strings, but most of them cannot intercept the required characters according to the number of Chinese characters. The following code...
5. Getting started with the substr method of JavaScript string objects (used to intercept strings)_Basic knowledge
Introduction: This article mainly introduces the getting started with the substr method of JavaScript string objects. substr is used to intercept a string based on the starting position and length. Friends who need it can refer to the following
The above is the detailed content of 5 recommended articles about length interception. For more information, please follow other related articles on the PHP Chinese website!