This question already has an answer here:
Afternoon guys!
For some reason Complex (Curly) Syntax in my PHP code doesn't interpreter as variable
function view($name, $data = [])
{
require __DIR__ . '/../app/views/{$name}.view.php';
}
Here is the code I am calling view('index'); the problem is I get this error:
Warning: require(./core/../app/views/{$name}.view.php): failed to open stream
By the way my PHP version before anyone asks is 7.0.13
Thanks for your help!
</div>