[Tutor] Initialize values from a text input file
Hugo Arts
hugo.yoshi at gmail.com
Tue Jan 4 02:37:11 CET 2011
On Tue, Jan 4, 2011 at 2:06 AM, Alan Gauld <alan.gauld at btinternet.com> wrote:
>
> "Tim Johnson" <tim at johnsons-web.com> wrote
>
>> Now, Alan, do you know anything about PHP? If you do, can you
>> comment on the PHP extract() function?
>
> I know enough basic PHP to read a page with code in it and get the general
> drift. I've never written a line of it and have learned enough about it that
> I don't want to! :-)
>
> Now as for extract() - it doesn't appear in my Teach Yourself PHP book, so
> nope, I've no idea what it does, I'd need to look it up.
> And I'm way too lazy, and it's way too late to do that! :-)
>
extract takes an array and merges it with the local symbol table.
Essentially the same thing locals() would do if it was actually
writable everywhere (as Steven points out it isn't).
If you ask me, this is an insanely bad idea and I have not a clue as
to why you'd actually want to do this, rather than just work with the
array.
Hugo
More information about the Tutor
mailing list