What is the following data format? What should I do with PHP? Thank you! I: 5; a: 10: {I: 2; a: 2: {s: 2: & quot; df & quot; s: 1: & quot; 0 & quot; s: 2: & quot; da & quot; s: 1: & quot; 1 & quot;} I: 22; a: 2: {s: 2: & quot; df & quot; what is the following data format? What should I do with PHP? Thank you!
I: 5; a: 10 :{
I: 2; a: 2: {s: 2: "df"; s: 1: "0"; s: 2: "da"; s: 1: "1 ";}
I: 22; a: 2: {s: 2: "df"; s: 1: "1"; s: 2: "da"; s: 1: "1 ";}
I: 18; a: 2: {s: 2: "df"; s: 1: "0"; s: 2: "da"; s: 1: "1 ";}
I: 130; a: 2: {s: 2: "df"; s: 1: "0"; s: 2: "da"; s: 1: "2 ";}
I: 4; a: 2: {s: 2: "df"; s: 1: "1"; s: 2: "da"; s: 1: "1 ";}
I: 128; a: 2: {s: 2: "df"; s: 1: "1"; s: 2: "da"; s: 1: "1 ";}
I: 20; a: 2: {s: 2: "df"; s: 1: "0"; s: 2: "da"; s: 1: "2 ";}
I: 1; a: 2: {s: 2: "df"; s: 1: "1"; s: 2: "da"; s: 1: "2 ";}
I: 3; a: 2: {s: 2: "df"; s: 1: "1"; s: 2: "da"; s: 1: "2 ";}
I: 129; a: 2: {s: 2: "df"; s: 1: "1"; s: 2: "da"; s: 1: "1 ";}
}
------ Solution --------------------
A lot: learning.
------ Solution --------------------
I: 5; and later parts are standard serialized strings, excluding line breaks, spaces, and other characters.
Unserialize (substr (......));
------ Solution --------------------
You have taken this out of context.
Remove the start I: 5, and delete the carriage return line break to serialize the string for php.
Print_r (unserialize ($ s ));
PHP code
Array ([2] => Array ([df] => 0 [da] => 1) [22] => Array ([df] => 1 [da] => 1) [18] => Array ([df] => 0 [da] => 1) [130] => Array ([df] => 0 [da] => 2) [4] => Array ([df] => 1 [da] => 1) [128] => Array ([df] => 1 [da] => 1) [20] => Array ([df] => 0 [da] => 2) [1] => Array ([df] => 1 [da] => 2) [3] => Array ([df] => 1 [da] => 2) [2, 129] => Array ([df] => 1 [da] => 1 ))
------ Solution --------------------
I learned how to serialize it several times.
------ Solution --------------------
I learned it too !!