What is data serialization ?

后端 未结 5 1640
后悔当初
后悔当初 2021-01-31 02:33

First of all, I could not able to get clear definition of it from WikiPedia or even from serialize function in the PHP manual. I need to know some cases we need the term seriali

5条回答
  •  日久生厌
    2021-01-31 02:53

    Since you've tagged it with javascript, one kind of serialization could be form serialization.

    Here are the references for the jQuery and prototype.JS equivalents.

    What they basically do is serialize form input values into comma-separated name-value pairs.

    So considering an actual usage..

    $.ajax({
       url : 'insert.php?a=10,b=15' //values serialized via .serialize()
       type: 'GET'
    });
    

    And you would probably do $GET["a"] to retrieve those values, I'm not familiar with PHP though.

提交回复
热议问题