I am trying to print a variable into another variable in a blade template. I have a variable from database that contains "dynamic" data from another variable.
Example:
$foo = 'user';
$bar = 'Hello , how are you?';
In blade I am doing this:
{!! $bar !!}
But the result is:
Hello , how are you?
I tried with but the result is the same.
I can't concatenate both variables. For example:
$foo = 'user';
$bar = 'Hello ' . $foo . ', how are you?';
It isn't possible because I don't have the control of the variables, they are filled dynamically from database.
Any idea/suggestion?
Thanks
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2JMJRJC
via IFTTT
Aucun commentaire:
Enregistrer un commentaire