<?php
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */
function smarty_modifier_imgsrt($str)
{
	$str = (is_numeric($str)) ?  number_format($str,2,',','.') : $str;
	$str = "$str";
	$len = strlen($str);
	for($x=0; $x<$len; $x++)
	{
		$s = $str{$x};
		switch($str{$x})
		{
			case '.' : $s = 'dot'; break;
		}
		
		$price_in_image .= '<img src="' . IMG_PATH . '/shop/' . $s . '.png" alt="' . $str{$x} . '" />';
	}
	return $price_in_image;
}

?>
