i sending the values of an Array in php from a php file to another, and i am using an input hidden with seriaize, it works fine, but i read on a web page that i can use serialize when the array has not a lot of values just when it has a few values, i dont know, for example an array[10] or [8], and I using this array to save a lot of values, like 40 or more, and i want to make sure that serialize() will work fine on that, what do you think?, can I use serialize with a lot of values inside an array?
My code here:
////file1.php////
//here both $code_period and $selection are array, and i dont know exactly how many values i will
//save inside them
echo "<form name='formprocess' method='post' action='process.php'>
<input name='code_period_name' type='hidden' value='".serialize($code_period)."'>
<input name='selection' type='hidden' value='".serialize($selection)."'>
<input style='background:#13284B;color:White' type='submit' value='Process'>
</form>";
////process.php////
$code_period_name=unserialize($_POST['code_period_name']); //im catching these values this way
$selection=unserialize($_POST['selection']);
Like I said before, It works just fine I just wanna know your opinion about this, cause i read on a web page that i can use serialize when i have to save a few values