i’m manually reading out database entries from a plugin (eventscalendar wordpress). there are user defined fields / custom fields stored in the database. excuse my ignorance – but i’m having trouble associating the format the data is stored in:
a:1:{s:3:"key";s:6:"extern";}
so in the end all i would need is the value of s:6:”” in a simple variable.
lets say $key = “extern”
any quick solutions?
thanks,
mark
Take a look at unserialize to get it back into an array: http://php.net/manual/en/function.unserialize.php
That is a serialized array– note the
a
at the beginning. It also works on Objects.It is created with PHP’s
serialize
and converted back to proper array/object withunserialize
.It serves a similar purpose to the
JSON
format.