Converting string / array with php
I am manually reading database entries from a plugin (eventscalendar wordpress). custom fields / custom fields are stored in the database. excuse my ignorance - but I am having trouble binding the format in which the data is stored:
a:1:{s:3:"key";s:6:"extern";}
so I end up needing the value s: 6: "" in a simple variable. say $ key = "extern"
any quick solutions? thanks, sign
+3
source to share
2 answers
Take a look at unserialize to get it back into an array: http://php.net/manual/en/function.unserialize.php
+6
source to share