php - how to use {{$variable}} in css , Laravel 5.1 -


i know can use {{$variable}} in html php variables can same in css. possible or doing wrong here ?

<form style="color:{{$values['color']}};" action ="<?php echo $_server["php_self"];?>" method="post"> 

assuming varaible valid , holds "#f90", can do:

style="color:<?= $values['color']; ?>;" 

or

style="color:<?php echo $values['color']; ?>;" 

if view/template .php work (even if using laravel, can still use plain php in views). using templating other default blade template? if not using {{{ should work.

style="color:{{{ $values['color'] }}}" 

n.b again these work if varaible holding correct data. if still having issues try die(var_dump($values)); check values you'd expect


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -