accessing wordpress serialized data outside wp

Use PHP’s unserialize function:

<?php
$data="a:2:{i:0;s:12:"Sample array";i:1;a:2:{i:0;s:5:"Apple";i:1;s:6:"Orange";}}";
$unserialized = unserialize($data);

echo '<pre>';
print_r($unserialized);
echo '</pre>';
?>

Result:

Array
(
    [0] => Sample array
    [1] => Array
        (
            [0] => Apple
            [1] => Orange
        )
)

Got the sample data over at unserialize.com, a handy little site if you want to quickly check what’s inside that serialized string.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)