test) ? $var->test : ''}} In php it would be like $var_name = is_numeric($v" /> test) ? $var->test : ''}} In php it would be like $var_name = is_numeric($v" /> test) ? $var->test : ''}} In php it would be like $var_name = is_numeric($v"/>

Smarty php-function inside assing

38 Views Asked by At

Trying to assign but without success:

{assign "var_name" {is_numeric($var->test) ? $var->test : ''}}

In php it would be like

$var_name = is_numeric($var->test) ? $var->test : '';
1

There are 1 best solutions below

0
holden321 On

It should be like this:

{assign var_name {(is_numeric($var->test)) ? $var->test : ''}}