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
Post a Comment