Created
July 3, 2019 02:30
-
-
Save aalipar13/bf34782141ebb97c98ff1fc4f5024ae2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$json = file_get_contents('json.txt');; | |
$array = json_decode($json, true); | |
$newArray = []; | |
foreach ($array as $value) | |
{ | |
$value['provDesc'] = ucwords(strtolower($value['provDesc'])); | |
$newArray[] = $value; | |
} | |
// echo json_encode($newArray); | |
file_put_contents('province.txt', var_export($newArray, true)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment