I have an array like this:
$templateStyleArr = array(
0 => array(
'text' => 'General Text',
'default_value' => '#444',
'scopval' => 'general',
),
1 => array(
'text' => 'Accent Color',
'default_value' => '#c91a1a',
'scopval' => 'Accent',
),
2 => array(
'text' => 'Button Hover',
'default_value' => '#2ec72e',
'scopval' => 'dark_btn_hover',
),
3 => array(
'text' => 'Button Text',
'default_value' => '#3300f5',
'scopval' => 'btn_txt',
),
)
I want to save this array to data base in Json format using PHP.I am using json_encode function. Json saved perfectly.Problem is When I try to decode the saved json(using json_decode),I am not getting the above array back.