wb-archiv283/tags/2.8.3/wb/include/quickSkin_alpha/_lib/qx/qx_stringformat.php @ 1657
1 | 1546 | Luisehahne | <?php
|
---|---|---|---|
2 | /**
|
||
3 | * QuickSkin Extension stringformat
|
||
4 | * Inserts a formatted String
|
||
5 | *
|
||
6 | * Usage Example:
|
||
7 | * Content: $template->assign('SUM', 25);
|
||
8 | * Template: Current balance: {stringformat:SUM,'$ %01.2f'}
|
||
9 | * Result: Current balance: $ 25.00
|
||
10 | *
|
||
11 | * @author Andy Prevost andy@codeworxtech.com - original by Philipp v. Criegern philipp@criegern.de
|
||
12 | */
|
||
13 | function qx_stringformat ( $param, $format ) { |
||
14 | return sprintf( $format, $param ); |
||
15 | }
|