Text values in a BLOB field

I need to retrieve text data from a BLOB in MySql and unfortunately I didn’t create the db. When I get the data, this is what it looks like…

a:1:{i:3;s:18:“[email protected]”;}
a:1:{i:3;s:24:“[email protected]”;}
a:1:{i:3;s:19:“[email protected]”;}

and this is what I need…

[email protected]
[email protected]
[email protected]

Anyone know how I can parse that out? I am probably missing something simple but it’s really kicking my tail. Any help would be greatly appreciated!

And yes, those are bogus email addys… changed to protect the innocent :slight_smile:

This seem to be serialized array. Try to apply unserialize() function to each of these values and see how you can retrieve email address by array index:

<?php $arr = unserialize('a:1:{i:3;s:18:"[email protected]";}'); echo '
echo '
'; ?>

This will give you entire array in format index => value

Sponsor our Newsletter | Privacy Policy | Terms of Service