PHP demo-Post a multi-dimension array using a single hidden input using PHP serialize



How can we post a huge array in a single input in a form?
We can use PHP function serialize.
We can use PHP serialize function to generates a sortable representation of a value.
After post the data, we can use PHP function unserialize to change it back.
We had better use PHP function htmlentities to display array in the form properly and use html_entity_decode to change it back. PHP 函数示范
More about this…

, , , , , , , ,

1 thought on “PHP demo-Post a multi-dimension array using a single hidden input using PHP serialize

Leave a Reply

Your email address will not be published. Required fields are marked *