How to use php serialize() and unserialize()

后端 未结 10 1714
Happy的楠姐
Happy的楠姐 2020-11-22 05:03

My problem is very basic.

I did not find any example to meet my needs as to what exactly serialize() and unserialize() mean in php? They ju

10条回答
  •  伪装坚强ぢ
    2020-11-22 05:56

    Run this program its echo the output

    a:3:{i:0;s:1:"1";i:1;s:1:"2";i:2;s:1:"3";}
    


    here
    a=size of array
    i=count of array number
    s=size of array values

    you can use serialize to store array of data in database
    and can retrieve and UN-serialize data to use.

提交回复
热议问题