PHP – General Array April 3, 2014 By Rain array, php In PHP PHP - General Array: 1.write array to file: $arr=array("orange","apple"); $file = fopen("test.txt","w"); fwrite($file,print_r($arr_car,true)); fclose($file);