title: PHP - Find and Replace of JSON data
body: <p>I'm trying to do a find replace of the json data below. I'm trying to replace "Consumer" with "CON", "Industrial" with "IND", and "Technology" with "TCH". Ideally, I would like to pass a function an array of finds (i.e., {"Consumer", "Industrial", "Technology"}) along with an array of replaces (i.e., {"CON", "IND", "TCH"}), or some other way to quickly define multiple find and replace pairs (there will be many more pairs than these 3). What is the best function to do this? Thanks, any help is appreciated.</p>
  
  <pre><code>[{"category":"Consumer","price":"18.9","number":"5"},{"category":"Industrial","price":"13.4","number":"4"},{"category":"Technology","price":"15.5","number":"3"}]
  </code></pre>