This article mainly introduces the DedeCms custom field call length truncation method. For more information, see testdedecms Template: www. php. cnxiazaicodededecms Method 1: run the php method .. [field: test & amp; nbsp; runphpyes] & amp; nbsp; @ mesubstr (@ me, truncated byte) & amp; nbsp; [field: test] Method 2: call... this article mainly introduces the DedeCms custom field call length truncation method. For more information, see test dedecms Template: www.php1.cn/xiazai/code/dedecms#1: run PHP .. [field: test runphp = yes] @ me = substr (@ me, intercept byte) [/field: test] Method 2: Call the built-in function method [field: test function = 'CN _ substr (@ me, intercept byte) '/] two methods are similar. the second method is more suitable for Chinese interception. the built-in functions encapsulated by dedecms have much better effects than the first one .. 1. dedeCms two methods to intercept custom field call length: This article mainly introduces DedeCms custom field call length intercept method. For more information, see section 2. analysis on common operations of GridView in Yii2
1. Detailed introduction to custom fields
Introduction: This article mainly introduces the DedeCms custom field call length truncation method. For more information, see
3. php code for intercepting strings according to the specified length
Brief introduction: php code for intercepting strings according to the specified length
4. example of Chinese and English string length truncation in php
Introduction: before using this method, go to php. enable php_mbstring.dll extension in ini and remove the semicolon before extension. many methods to intercept Chinese strings cannot extract the desired characters by the number of Chinese characters. the following code is used...
5. JavaScript string object substr method entry instance (used to intercept strings) _ basic knowledge
Introduction: This article mainly introduces an example of the substr method for JavaScript string objects. substr is used to extract strings based on the start position and length. For more information, see
The above is the details of the five articles recommended for length truncation. For more information, see other related articles in the first PHP community!