I have a PHP array that I am saving to a MySQL Database:
$q35list = serialize($_POST["q35list"]);
Using mysqli_prepare
I am saving successfully to the database.
What is odd is that I have a mix of data being stored:
s:0:"";
- fine as user has not selected anything.
s:55:"Set[]=6&Set[]=4&Set[]=3&Set[]=7&Set[]=2&Set[]=5&Set[]=1";
- fine as user has selected options and this appears correctly saved.
But, I am getting a few odd ones, that I can neither replicate or understand how/what/why this is being saved:
s:4:"s:4:";
s:5:"s:55:";
s:4:"s:8:";
Has anyone come across this/ know what this might be and would be kind enough to provide an explanation?
s:5:"s:55:";
. Verify your serializing workflow. – lserni Jul 2 '13 at 9:54