initial commit
[anyfivecardpokerhand.git] / include / lib / plugins / function.fileext.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/*
 * Smarty plugin
 * -------------------------------------------------------------
 * File:     functions.fileext.php
 * Type:     function
 * Name:     fileext
 * Version:  1.0
 * Date:     April 28, 2005
 * Purpose:  Returnes a file extension
 *
 * Use: {fileext var="arr" value="file.jpg"}
 * Author:   Razvan Stanga <razvan@phprebel.org>
 * -------------------------------------------------------------
 */
 
function smarty_function_fileext ($params, &$smarty)
{
 
        if ( $params['var'] != "" AND $params['value'] != '' ) {
            $smarty->assign ($params['var'], substr(strrchr($params['value'], "."),1) );
        }
 
}
 
?>
 
comments