I have a string that contains an array like:
$tarray = Array ( [gt_ref_id] => 36493115 [tender_notice_type] => [organisation_name] => ROSALES WATER DISTRICT [address] => No. 5 Bonifacio Street [address2] => [contact_person] => [tender_notice_no] => ROSALWD 2016-011-0144(Ref: 4206661)
)
but I want to access the value of this array like:
echo "ref id = ".$tarray['gt_ref_id'];
It should output like:
ref id = 36493115
but I can't because it's a string. I could if it was an array.
How can I convert the string to a proper PHP array?