1 Oct 2009 05:12
Re: Converting print_r() output to an array
Michael Shadle <mike503 <at> gmail.com>
2009-10-01 03:12:02 GMT
2009-10-01 03:12:02 GMT
first off, if you pass print_r($var, true) it will return it instead of printing it. if you go that route. have you looked at var_export() ? On Wed, Sep 30, 2009 at 8:07 PM, James Colannino <james <at> colannino.org> wrote: > Hey everyone, I was pretty sure there was an easy built-in solution for > what I want to do, but I've been googling around with no luck. > Basically, I just want to take a string containing the output of > print_r() and convert it back into an array again. > > That is possible, right? If so, how do I go about it? If not, what's a > quick and easy way to parse a string and turn it into an array (I don't > necessarily need the string to be in the format print_r returns). > > Thanks! > > James > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RSS Feed