]> git.sur5r.net Git - contagged/blob - smarty/plugins/modifier.csv.php
145c41b0d72ab90799de79a8a359d9ecf07f6567
[contagged] / smarty / plugins / modifier.csv.php
1 <?php
2 /**
3  * Smarty plugin
4  * @package Smarty
5  * @subpackage plugins
6  */
7
8
9 /**
10  * Smarty csv modifier plugin
11  *
12  * Type:     modifier<br>
13  * Name:     csv<br>
14  * Purpose:  format string for CSV output
15  * @param string
16  * @return string
17  */
18 function smarty_modifier_csv($string)
19 {
20         return '"'.strtr(trim($string),'"','""').'"';
21 }
22
23 ?>