I need help. I have a smarty based program that I am modifying. I
have a smarty template file that consists of smarty and HTML.
I need to integrate some PHP database calls into it. My problem is I
cannot figure out how to pass value between smarty and PHP. Going
from php to smarty I've tried this:
{php}
$smarty = new Smarty;
$smarty->assign("x", 100);
{/php}
<br>{$x}<br>
So the value $x comes out blank. Shouldn't it be "100"?
and in smarty after this point how do I reference the $x variable?
----------------------
Next question. How do I give php values from smarty. For example if
there is a loop like:
{section name=xyz loop=$zzz}
{php}
How do i get to $xyz from in here (php)?
{/php}
{/section}
---------------------
I just know someone out there knows the answer - HELP!
have a smarty template file that consists of smarty and HTML.
I need to integrate some PHP database calls into it. My problem is I
cannot figure out how to pass value between smarty and PHP. Going
from php to smarty I've tried this:
{php}
$smarty = new Smarty;
$smarty->assign("x", 100);
{/php}
<br>{$x}<br>
So the value $x comes out blank. Shouldn't it be "100"?
and in smarty after this point how do I reference the $x variable?
----------------------
Next question. How do I give php values from smarty. For example if
there is a loop like:
{section name=xyz loop=$zzz}
{php}
How do i get to $xyz from in here (php)?
{/php}
{/section}
---------------------
I just know someone out there knows the answer - HELP!
Comment