wb-archiv283/branches/2.8.x/wb/include/quickSkin/_lib/qx/qx_stringformat.php @ 1546
| 1 |
<?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 |
}
|
| 16 |
|
| 17 |
?>
|