A
A
Alexey Nikolaev2015-02-14 22:18:15
CMS
Alexey Nikolaev, 2015-02-14 22:18:15

How to decode an array of options in WP?

Hello.
Bottom line: in WP, options and settings are stored in an incomprehensible format like
s:15:"auto_adjust_ids";i:1;s:11:"alert_delay";
Of course, it is extremely difficult to parse this manually. Is there any function that allows you to decrypt such a format?
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton, 2015-02-14
@Heian

)))) all developers have gone though
This is the result of serialize(). To turn a serialized string back into a PHP value, use the unserialize() function.
Read carefully here php.net/manual/en/function.serialize.php

V
Vladimir, 2017-10-14
@campus1


An object property can only be a string, so b is cast to the string https://jsfiddle.net/u69v10tb/ before becoming a key
You need to use Map https://developer.mozilla.org/en-US/docs/Web/ JavaS...
https://jsfiddle.net/m1hxpbp5/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question