Tried decode and encode and just get the mail so my guess is that database does not simply has the email adress encoded.
anyhow if this is always the input and the email is always the last then this works
[php]$mailno = “: a:1:{s:3:‘url’;s:19:‘[email protected]’;}’”; //$mailno = : a:1:{s:3:‘url’;s:19:‘[email protected]’;}’
$mailno = end(explode(":", $mailno)); //$mailno = ‘[email protected]’;}’
$mailno = substr($mailno, 1, -4); //$mailno = [email protected] [/php]
end: takes the last value in the array.
explode: explodes the string at the : and makes it an array.
substr: remove the first charachter (the ') and the last 4 chracters (the ‘;}’).
against note that this only works if the format of $mailno is always the same.
my test to test encode:
[php]<?php
$mail = "[email protected]";
echo “mail =” . $mail . “
”;
$mailenc = base64_encode ($mail);
echo “mail encoded =” . $mailenc . “
”;
$maildec = base64_decode($mailenc);
echo “mail decoded =” . $maildec . “
”;
?>[/php]