Project

General

Profile

1
<?php
2
  /**
3
  * QuickSkin Extension substr
4
  * Insert specific part of a string
5
  *
6
  * Usage Example:
7
  * Content:  $template->assign('HEADLINE', 'My Title');
8
  * Template: <font size=4>{substr:HEADLINE,0,1}</font>{substr:HEADLINE,1}
9
  * Result:   <font size=4>M</font>y Title
10
  *
11
  * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
12
  */
13
  function qx_substr ( $param, $lim0 = 0, $lim1 = 0 ) {
14
    if ($lim1) {
15
      return substr( $param, $lim0, $lim1 );
16
    } else {
17
      return substr( $param, $lim0 );
18
    }
19
  }
(38-38/43)