How to get update_post_meta output to include string length
Your data is being serialize properly. Your code saves an array of integers. Integers are not strings and so a string length is not saved. Run the following code and it should illustrate the point: $str=”a:4:{i:0;s:4:”7613″;i:1;s:4:”7615″;i:2;s:4:”7616″;i:3;s:4:”7618″;}”; $str = maybe_unserialize($str); var_dump($str); echo ‘<br/>’; var_dump(maybe_serialize($str)); echo ‘<br/>’; $str = array( 1234,4567,8910,1112 ); var_dump(maybe_serialize($str)); echo ‘<br/>’; $str = … Read more