title: array replace value only specific keys
body: <p>I have two array that in json something like this  (label)  :</p>
  
  <pre><code>[
      {
        "dates": "2019-07-01",
        "c_job": 0
      },
      {
        "dates": "2019-07-02",
        "c_job": 0
      },
      {
        "dates": "2019-07-03",
        "c_job": 0
      },
      {
        "dates": "2019-07-04",
        "c_job": 0
      }
    ]
  </code></pre>
  
  <p>and the others data from database something like this (data)  :</p>
  
  <pre><code>{
      "EXPORT": [
        {
          "dates": "2019-07-01",
          "c_job": 12
        },
        {
          "dates": "2019-07-02",
          "c_job": 8
        },
        {
          "dates": "2019-07-04",
          "c_job": 11
        }
      ],
      "IMPORT": [
        {
          "dates": "2019-07-03",
          "c_job": 11
        }
      ]
  }
  </code></pre>
  
  <p>after that i try array replace to make data precision with label with this code :</p>
  
  <pre><code>foreach($data as $key =&gt; $value) {
              $datafinal[$key] = array_replace($label,$value);
          }
  </code></pre>
  
  <p>and the output is (datafinal)  :</p>
  
  <pre><code>{
      "EXPORT": [
        {
          "dates": "2019-07-01",
          "c_job": 12
        },
        {
          "dates": "2019-07-02",
          "c_job": 8
        },
        {
          "dates": "2019-07-04",
          "c_job": 11
        },
        {
          "dates": "2019-07-04",
          "c_job": 0
        }
      ],
      "IMPORT": [
        {
          "dates": "2019-07-03",
          "c_job": 11
        },
        {
          "dates": "2019-07-02",
          "c_job": 0
        },
        {
          "dates": "2019-07-03",
          "c_job": 0
        },
        {
          "dates": "2019-07-04",
          "c_job": 0
        }
      ]
    }
  </code></pre>
  
  <p>what i want is something like this :</p>
  
  <pre><code>{
      "EXPORT": [
        {
          "dates": "2019-07-01",
          "c_job": 12
        },
        {
          "dates": "2019-07-02",
          "c_job": 8
        },
        {
          "dates": "2019-07-03",
          "c_job": 0
        },
        {
          "dates": "2019-07-04",
          "c_job": 11
        }
      ],
      "IMPORT": [
        {
          "dates": "2019-07-01",
          "c_job": 0
        },
        {
          "dates": "2019-07-02",
          "c_job": 0
        },
        {
          "dates": "2019-07-03",
          "c_job": 11
        },
        {
          "dates": "2019-07-04",
          "c_job": 0
        }
      ]
    }
  </code></pre>
  
  <p>i have try array reduce and replace</p>