I have the data saved using a plugin in this format:
a:7:{s:6:'Sunday ';a:3:{s:6:'active ';s:3:'yes ';s:5:'start ';s:5:'08: 00 ';s:3:'end ';s:5:'13: 00 ';}
s:6:'Monday ';a:3:{s:6:'active ';s:3:'yes ';s:5:'start ';s:5:'08: 00 ';s:3:' end ';s:5:'17: 00 ';}
s:7:'Tuesday ';a:3:{s:6:' active ';s:3:'yes ';s:5:'start ';s:5:'08: 00 ';s:3:'end ';s:5:'17: 00 ';}
s:9:'Wednesday ';a:3:{s:6:'active ';s:3:'yes ';s:5:'start ';s:5:'08: 00 ';s:3:'end ';s:5:'17: 00 ';}
s:8:'Thursday ';a:3:{s:6:'active ';s:3:'yes ';s:5:'start ';s:5:'08: 00 ';s:3:'end ';s:5:'17: 00 ';}
s:6:'Friday ';a:3:{s:6:'active ';s:3:'yes ';s:5:'start ';s:5:'08: 00 ';s:3:'end ';s:5:'17: 00 ';}
s:8:'Saturday ';a:3:{s:6:'active ';s:3:'yes ';s:5:'start ';s:5:'08: 00 ';s:3:'end ';s:5:'13: 00 ';}}
How can I extract this data using php or any WordPress functions?
I have already tried unserialize()
, maybe_unserialize()
json_decode
. But all I get is null in the end.