<?php
$array=array('color'=> array('blue','red','green'),'size'=> array('small','medium','large'));
$newarr = array('price'=> array('120','130','140'));
$array = $array + $newarr;
file_put_contents('filename.txt', json_encode($array));
$data = json_decode(file_get_contents('filename.txt'),true);
echo "<pre>";
var_dump($data);
var_dump($data['price']);