I am writing a PHP statement for an ios app to get results from the Post_meta field in WordPress.
We use a plugin for woocommerce to see where the article is stored.
I wrote the code but in the wordpress database the meta_value is stored in an odd way:
a:1:{i:0;a:9:{s:5:"title";s:22:"Brands Meubeltransport";s:6:"plaats";s:7:"Tegelen";s:8:"postcode"; s:7:"5932 AA";s:5:"adres";s:17:"Tichlouwstraat 45";s:5:"email"; s:33:"k.brands@brandsmeubeltransport.nl";s:8:"telefoon";s:11:"077-3738245"; s:4:"site";s:22:"http://www.linteloo.nl";s:2:"id";s:26:"tab-brands-meubeltransport";s:7:"content";s:0:"";}}
How can i transform this adres information into a redable string or how can i use this string in Xcode to retrieve adress and postalcode?
You need to
unserialize ( string $str )
the string , worpress stores the information as serialized string if array of values is passedunserialize ( string $str )