I had two script, one in .php and one in .tpl I need to pass the variable in php to the tpl. I tried this one, but nothinng works (but somehow
- it works for one or two days, and after that,
- it showed blank,
- if i create another php script just to echo the variable, it works.
PHP Code:
<?php
$usdidr2 = "12610.198648";
$usdidr2 =  number_format($usdidr,2,',','.');
echo $usdidr2;
session_start();
$regValue = $usdidr2;
$_SESSION['regUSDIDR1'] = $regValue;
?>
SMARTY Code:
<li>
    <a href="example.php"><strong>
        {php}
            session_start();
            $regValue = $_SESSION['regUSDIDR1'];
            $regValue2 = number_format(45.99*$regValue,2,',','.');
            echo "Rp. ".$regValue."";
            print_r($regValue);
        {/php}
    </strong></a>
</li>
 
     
     
    