how to use php function str_replace in laravel framework.个
我的表列名称上的数组键名,因此键有‘_’,如First_Name、Last_Name等.我想在Blade 文件中删除这些‘_’.我的要求是替换.blade.php文件中的字符串.
i am trying this php code but it's useless.
<th>{{str_replace('_', ' ', $str)}}</th>
thanks
how to use php function str_replace in laravel framework.个
我的表列名称上的数组键名,因此键有‘_’,如First_Name、Last_Name等.我想在Blade 文件中删除这些‘_’.我的要求是替换.blade.php文件中的字符串.
i am trying this php code but it's useless.
<th>{{str_replace('_', ' ', $str)}}</th>
thanks
您可以在.blade.php文件中使用php代码
试试这个
<th> <?=str_replace('_', ' ', $str)?> </th>