I have a PHP file a configuration file coming from a Yii message translation file which contains this:
\'value\'
\'
When an included file returns something, you may simply assign it to a variable
$myArray = include $in;
See http://php.net/manual/function.include.php#example-126
We use this in our CMS. You are close, you just need to return the value from that function.
function fetchArray($in)
{
if(is_file($in))
return include $in;
return false
}
See example 5# here
As the file returning an array, you can simply assign it into a variable
Here is the example
$MyArray = include($in);
print_r($MyArray);
Output:
Array
(
[key] => value
[key2] => value
)