Paul's Programming Notes PostsRSSGithub

Include Array From File - PHP

file.php

<?php
return array('item1','item2');
?>

Your php code:

<?php
$thisVariable = include('file.php');
print_r($thisVariable); //prints the array
?>