I have a large array that would be messy to include in the file "main.php"
itself and would prefer to include/require it. Say I have the following
line in "main.php":
require_once('/arr.php');
And the "arr.php" file looks something like this:
<?php
array(1)='ok1@O k.com';
array(2)='ok2@O k.com';
array(3)='ok3@O k.com';
array(4)='ok4@O k.com';
array(5)='ok5@O k.com';
array(6)='ok6@O k.com';
array(7)='ok7@O k.com';
array(8)='ok8@O k.com';
array(9)='ok9@O k.com';
array(10)='ok10 @Ok.com';
?>
Would I be able to reference the array AS IF I had declared the array in
"main.php"?
I am a programmer but new to PHP.
Many thanks.
itself and would prefer to include/require it. Say I have the following
line in "main.php":
require_once('/arr.php');
And the "arr.php" file looks something like this:
<?php
array(1)='ok1@O k.com';
array(2)='ok2@O k.com';
array(3)='ok3@O k.com';
array(4)='ok4@O k.com';
array(5)='ok5@O k.com';
array(6)='ok6@O k.com';
array(7)='ok7@O k.com';
array(8)='ok8@O k.com';
array(9)='ok9@O k.com';
array(10)='ok10 @Ok.com';
?>
Would I be able to reference the array AS IF I had declared the array in
"main.php"?
I am a programmer but new to PHP.
Many thanks.
Comment