0

I would like to use the phalcon ternary operator provided by version 3.4, but I would like to use it with the one validation at the same time.

{% set pageType = 'basicSetting' %} {{ pageType == 'basicSetting' ? 'class="active"' : '' }}

The above example is from here

0

1 Answer 1

0

After some research and analysis, I was able to find this,it is a little example

{% set result_that_you_want = (value==1) ? 'the result is 1' : 'the result is not the same the 1' %}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.