title: Fetching json array in php
body: <p>I have problem with fetching json array that i send with <code>post</code> by android app.<br/><br/>
  <code>PHP</code> code :</p>
  
  <pre><code>&lt;?php
  $properties_json = json_decode($_POST['property'], true);
  foreach ($properties_json-&gt;properties as $pro_element) {
     echo $pro_element-&gt;property_id . '&lt;br/&gt;';
     echo $pro_element-&gt;property_name . '&lt;br/&gt;';
     echo $pro_element-&gt;property_value . '---------';
  }
  </code></pre>
  
  <p><code>JSON</code> array that i post :</p>
  
  <pre><code>{
    "properties": [
      {
        "property_id": "654",
        "property_name": "Gender",
        "property_value": "Male"
      },
      {
        "property_id": "655",
        "property_name": "Name",
        "property_value": "Amin"
      },
      {
        "property_id": "656",
        "property_name": "Mobile",
        "property_value": "654-451-456"
      }
    ]
  }
  </code></pre>
  
  <p>Error :</p>
  
  <blockquote>
    <p>Invalid argument supplied for foreach()</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/0t0l1.png" rel="nofollow noreferrer">enter image description here</a></p>