I have a php file that looks like the following
<?php
return [
'first' => 'some value',
'second' => 'blah blah',
];
I want to set the php output's array as a variable. So my variable is the actual array. I tried to do the following
$config = file_get_contents(__DIR__ . '/config.php');
However, that return the file content as a string.
How can $config
be the returned array from my config.php
file?