Converting print_r() output to an array

From: Date: Thu, 01 Oct 2009 03:07:54 +0000
Subject: Converting print_r() output to an array
Groups: php.general 
Request: Send a blank email to php-general+get-298421@lists.php.net to get a copy of this message
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

« previous php.general (#298421) next »