T
T
The Dragger2015-04-30 08:09:45
Yii
The Dragger, 2015-04-30 08:09:45

Shorthand check in yii(if else)?

Good morning everyone!!!
know the if else check but forgot the syntax of his brother ? :

<?php echo $form->dropDownList($model,'active', CHtml::listData(RefMahala::model()->findAll(), 'id', 'active') ,array('class'=>'span5')); ?>

two numbers come to 'active' i need to check if 1 then echo 'to tata' if 2 to echo 'tota'.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Mokhov, 2015-04-30
@IPD2

echo выражение ? результат в случае истины : результат в случае лжи;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question