Re: PHP code in form field - var_export() (slashes)?

From: Date: Wed, 24 Sep 2003 14:43:48 +0000
Subject: Re: PHP code in form field - var_export() (slashes)?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-163753@lists.php.net to get a copy of this message
I'm storing some multi-dimensional associative arrays in the file and then when I need the values somewhere I just include the file and voila my arrays are defined. Seemed better than looping through arrays writing to a file and then using the same loop structure to read lines from the file and assign back to the same array that I had it in in the first place. Thanks! -Shawn "Jason Wong" <php-general@gremlins.biz> wrote in message news:200309241415.48320.php-general@gremlins.biz... > On Wednesday 24 September 2003 12:00, Shawn McKenzie wrote: > > > O.K. I am collecting PHP code in a textarea and then using var_export() to > > a file for later use. In the file, the PHP is in single-quotes. > > I'm curious, why are you using var_export() if it's causing so many problems? > Acutally why are you using var_export() at all, am I missing something? > > Couldn't you just write the string containing the contents of the textarea > straight out to a file? > > -- > Jason Wong -> Gremlins Associates -> www.gremlins.biz > Open Source Software Systems Integrators > * Web Design & Hosting * Internet & Intranet Applications Development * > ------------------------------------------ > Search the list archives before you post > http://marc.theaimsgroup.com/?l=php-general > ------------------------------------------ > /* > The only function of economic forecasting is to make astrology look > respectable. > -- John Kenneth Galbraith > */

« previous php.general (#163753) next »