Paul's Programming Notes
Friday, June 28, 2013
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
?>
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment