Jump to content

Call a function in HTML


k0a1a

Recommended Posts

Hi there, I'm new to PHP, can you please give me an idea.

 

My PHP application is a Web site developed by some 3rd party developer. Exact execution flow is not known to me, but approximately it goes like that: a home-made CMS written in PHP selects data from database and then calls HTML template. In this template special constructs like {val var="title_`$smarty.session.lang`"} get evaluated and replaced with their values. Then the whole HTML is returned to the client.

It must have something to do with Smarty.

 

Now the question. I need to assign a variable the value, which is a random number.

I know how to assign a constant to a variable: {assign var=myVariable value="1"}

So the "little" thing I'm missing is - how to assign it a result of mt_rand(0,1) instead of the constant 1?

 

Thank you in advance!

Link to comment
https://forums.phpfreaks.com/topic/101924-call-a-function-in-html/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.