title: I want to compare two multidimational array or json String
body: <p>I have two json string, i have convert that string into array when i am sending request via curl.</p>
  
  <p>now my problem is i want to send another request if my string is updated.</p>
  
  <p>i have used array_diff but it's giving me error "Notice: Array to string conversion" because its multidimensional.</p>
  
  <p>my json strings are: </p>
  
  <pre><code>{"toy":["cycle","doll"],"accessory":["tv"]}
  </code></pre>
  
  <p>and second one is</p>
  
  <pre><code>{"toy":["cycle","cat","rabit"],"accessory":["tv","spekers"]}
  </code></pre>
  
  <p>how do i differentiate beetween this and get value if its not in another array.</p>
  
  <p>my converted two array is like this</p>
  
  <pre><code>Array
  </code></pre>
  
  <p><code>(
      ['toy'] =&gt; Array
      (
          [0] =&gt; cycle,
          [1] =&gt; doll
      ),
      ['accessory'] =&gt; Array
      (
          [0] =&gt; tv
      )</code></p>
  
  <p><code>);
  Array
  (
      ['toy'] =&gt; Array
      (
          [0] =&gt; cycle,
          [1] =&gt; cat,
          [2] =&gt; rabit
      ),
      [accessory] =&gt; Array
      (
          [0] =&gt; tv,
          [1] =&gt; spekers
      )</code></p>
  
  <p><code>);</code></p>