0

I am really going crazy at the moment, i have the following serialized, however when i try to unserialized it returns false.

Serialized array:

Array
(
    [0] => a:1:{i:0;s:9:"714443801";}
)

Current Code:

<?php
$votesArray = unserialize($Vzzz);

echo "<pre>";
    print_r($votesArray);
echo "</pre>";

?>

1
  • Are you storing the serialized data somewhere and after retrieving you are doing unserialize? Commented Nov 21, 2013 at 13:41

2 Answers 2

1

You are not unserializing it: try:

print_r(unserialize($votesArray[0]))
Sign up to request clarification or add additional context in comments.

Comments

0

If you are storing the serialized string, then store like this:

$serialisedData = base64_encode(serialize($arr));

After Retrieving,

//to unserialize...
$arr = unserialize(base64_decode($serialisedData));

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.