Re: looping variables from a file
| From: | Richard Davey | Date: | Wed, 24 Mar 2004 17:36:31 +0000 |
| Subject: | Re: looping variables from a file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181381@lists.php.net to get a copy of this message | ||
Hello Ryan,
Wednesday, March 24, 2004, 5:29:33 PM, you wrote:
RA> as you can imagine the above loop will save a crapload of time
RA> instead of "partially hard codeing" each key and value but how do
RA> I do this while reading from a file? and the other big problem is
RA> the file contains one or two arrays...
Why not just suck in the contents of the file using file_get_contents
and they display the output? Perhaps using a regexp to search for the
= sign and anything on the left is the variable name?
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html