Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • serialize and unserialize function in php

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 329
    Comment on it

    Serialize is a function which is used to convert a storable representation of a value. It converts an array into string containing a byte stream representation of a value.

      <?php  
        $serializeddata = serialize(array('apple', 'mango', 'banana'));  
        echo  $serializeddata . '<br>';  
        ?>  
    

    Unserialize is a function which converts the actual data from serialized data. it is just the opposite of serialize function. It converts string back to array.

    <?php  
    // Unserialize the data  
    $var1 = unserialize($serialized_data);  
    
    var&#95;dump ($var1);  
    ?> 
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: