<?php
$extraString = 'a:16:{s:5:\"items\";s:65:\"1|Oinment\n2|Powder\n3|Lotion\nTablets|Tablets\nCapsule|Capsule\n\";s:8:\"multiple\";b:0;s:6:\"aslist\";b:1;s:12:\"empty_option\";s:0:\"\";s:7:\"optrand\";i:0;s:12:\"other_option\";N;s:10:\"other_text\";s:8:\"Other...\";s:13:\"title_display\";s:6:\"before\";s:11:\"description\";s:0:\"\";s:11:\"custom_keys\";i:1;s:14:\"options_source\";s:0:\"\";s:7:\"private\";i:0;s:8:\"analysis\";b:1;s:5:\"value\";s:1:\"1\";s:11:\"css_classes\";s:0:\"\";s:15:\"wrapper_classes\";s:0:\"\";}';
$keysValuesArray = preg_split("/[;]/", $extraString, -1, PREG_SPLIT_NO_EMPTY);
print_r($keysValuesArray);
$itemsKey = preg_grep("/\"items\"/" ,$keysValuesArray);
print_r($keysValuesArray[0]);
print_r($itemsKey);
?>
- Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.21, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- Array
(
[0] => a:16:{s:5:\"items\"
[1] => s:65:\"1|Oinment\n2|Powder\n3|Lotion\nTablets|Tablets\nCapsule|Capsule\n\"
[2] => s:8:\"multiple\"
[3] => b:0
[4] => s:6:\"aslist\"
[5] => b:1
[6] => s:12:\"empty_option\"
[7] => s:0:\"\"
[8] => s:7:\"optrand\"
[9] => i:0
[10] => s:12:\"other_option\"
[11] => N
[12] => s:10:\"other_text\"
[13] => s:8:\"Other...\"
[14] => s:13:\"title_display\"
[15] => s:6:\"before\"
[16] => s:11:\"description\"
[17] => s:0:\"\"
[18] => s:11:\"custom_keys\"
[19] => i:1
[20] => s:14:\"options_source\"
[21] => s:0:\"\"
[22] => s:7:\"private\"
[23] => i:0
[24] => s:8:\"analysis\"
[25] => b:1
[26] => s:5:\"value\"
[27] => s:1:\"1\"
[28] => s:11:\"css_classes\"
[29] => s:0:\"\"
[30] => s:15:\"wrapper_classes\"
[31] => s:0:\"\"
[32] => }
)
a:16:{s:5:\"items\"Array
(
)
preferences:
175.53 ms | 406 KiB | 210 Q