CSS inside PHP statement -




i have php statement inside body 1 page not take property of body

<body id="page-top" class="single" <?php $actionid = $this->context->action->id; $pages =yii::$app->params['page']; if(!in_array($actionid,$pages) ? 'style="padding-top:10px;"' :'')  ?>> 

everything working not css. have inserted in wrong place?

'style="padding-top:10px;"' :'') 

did forgot echo before 'style="padding-top:10px;"'?

also use if , ?-operator. use 1 of them :)

<body id="page-top" class="single"      <?php          $actionid = $this->context->action->id;         $pages =yii::$app->params['page'];         echo (!in_array($actionid,$pages)) ? 'style="padding-top:10px;"' : '';     ?> > 




wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -