I'm trying to get variable name in given situation. I'm using Laravel model to call specific template in a table
Example:
$user_name="raza";
$site="mysite.com";
$template=Template::find($id);
$res=template->body;
echo $res;
Output is :
"hi $user_name welcome to $site"
Required Output:
"hi raza welcome to mysite.com"
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire