'String execute as object property in php(laravel)
I want to make dynamic object property from the sting.
$str = '{{$applications->' . str_replace( array('a.','b.','c.','d.'), '', $each_col_array[0]).'}}'
$str = "{{$applicants->applicant_name_en}}" //output
I used this <?php eval($str) ?> for view in blade but gives syntax error, unexpected in
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
