Posted by Somedude on 05/15/05 18:30
MRB wrote:
> Somedude wrote:
>
>> Hi all,
>>
>> I am trying to reload a stored print_r() dump back into a usable array
>> but seem to be missing something.
>>
>> // the retrieved array as stored in the database directly from print_r()
>> $db_result = 'Array ( [user] => somedude [script] => genPass.php )';
>>
>> How on earth do I make this into a usable array again where I can call
>> $arr['user'] or something similar ?!?
>>
>>
>> Thanks a lot IA,
>>
>> SomeDude.
>
>
>
> Why use print_r? Why not use serialize / unserialize instead which is
> meant for these kind of things?
I am using Pear::Log and that thing dumps array-messages as plain
print_r() data in my database.
Any change on running something like an 'unserialize' on the array-string ?
Navigation:
[Reply to this message]
|