Drian Drian Drian Drian - 8 months ago 50
MySQL Question

extract specific data from array in mysql database using php

This is the data that i need to extract like example profile_contact_numbers
so the output will be +639466276715

how can i do it in php code??
any help will do regards


Answer Source

I'm not sure 100% this can go into an array but try the unserialize function

$json_resp = {your values};
$array[] = unserialize($json_resp);

To check if it has gone into an array print_r on $array.

Read this link if the code above doesn't work


I have managed to fix it

$serialized = array(unserialize('a:2:{s:23:"profile_contact_numbers";s:13:"+639466276715";s:16:"profile_position";s:7:"Courier";}'));
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download