title: Impossible to get data from JSON
body: <ol>
  <li>I created the json data as text with javascript</li>
  <li>I stringify it in order to safely transfer it to another file</li>
  <li>I send it by post to a php file</li>
  <li>I get the post.</li>
  <li>I decode it.</li>
  <li>I checked the result with JSON formatter and it says everything ok.</li>
  <li>I try to get the data and it always return an empty value. No error.</li>
  </ol>
  
  <p>Now I show you everything:
  <strong>Step 1</strong></p>
  
  <pre><code>var team = '[';
  var filas=$("#players").find("tbody").find("tr").not(".hidden");
  for(i=0;i&lt;$(filas).length;i++)
  {
      team+='{"type_player": "' + $(filas).eq(i).find("td.dato").eq(0).html() + '" ,"mo": ' + parseInt($(filas).eq(i).find("td.dato").eq(1).html()) + ', "st": ' + parseInt($(filas).eq(i).find("td.dato").eq(2).html()) + ', "de": ' + parseInt($(filas).eq(i).find("td.dato").eq(3).html()) + ', "ar": ' + parseInt($(filas).eq(i).find("td.dato").eq(4).html()) + ', "N": "' + $(filas).eq(i).find("td.dato").eq(6).html() + '" , "D": "' + $(filas).eq(i).find("td.dato").eq(7).html() + '" , "price": ' + parseInt($(filas).eq(i).find("td.dato").eq(8).html()) + ', "habs": ' + $(filas).eq(i).find("input.p_habs").val() + ', "max_number": '+ $(filas).eq(i).find("td.dato").eq(9).html() + ' }';
      if((i+1)&lt;$(filas).length)
      {
          team+=", ";
      }
  }
  team+="]";
  </code></pre>
  
  <p><strong>Step 2</strong></p>
  
  <pre><code>$("#lista_Players").val(JSON.stringify(team));
  </code></pre>
  
  <p>Where lista_Players is a hidden input within a Form</p>
  
  <p><strong>Step 3</strong></p>
  
  <pre><code>&lt;form action='crear_raza.php' method="post"&gt;
  </code></pre>
  
  <p><strong>Step 4</strong></p>
  
  <pre><code>$play=$_POST['players'];
  </code></pre>
  
  <p><strong>Step 5</strong></p>
  
  <pre><code>$players=json_decode($play, true);
  </code></pre>
  
  <p><strong>Step 6</strong></p>
  
  <p>I print_r($players) showing:</p>
  
  <pre><code>[{"type_player": "Putrefactos" ,"mo": 5, "st": 3, "de": 3, "ar": 8, "N": "GM" , "D": "AFP" , "price": 40000, "habs": [22,60], "max_number": 16 }, {"type_player": "Pestigors" ,"mo": 6, "st": 3, "de": 3, "ar": 8, "N": "FGM" , "D": "AP" , "price": 80000, "habs": [20,60,64], "max_number": 4 }, {"type_player": "Guerreros de Nurgle" ,"mo": 4, "st": 4, "de": 2, "ar": 9, "N": "FGM" , "D": "AP" , "price": 110000, "habs": [5,57,60,64], "max_number": 4 }, {"type_player": "Bestia de Nurgle" ,"mo": 4, "st": 5, "de": 1, "ar": 9, "N": "F" , "D": "AGMP" , "price": 140000, "habs": [5,34,57,60,62,64,71,72], "max_number": 1 }, {"type_player": "erger" ,"mo": 3, "st": 3, "de": 3, "ar": 3, "N": "A" , "D": "P" , "price": 2345324, "habs": [1], "max_number": 4 }]
  </code></pre>
  
  <p><em>JSON formatter</em> exactly says: VALID JSON (RFC 4627)</p>
  
  <p><strong>Step 7</strong></p>
  
  <pre><code>echo $players[0]["mo"];
  </code></pre>
  
  <p>It returns me: [</p>
  
  <pre><code>echo $players[0]["type_player"];
  </code></pre>
  
  <p>It returns me nothing</p>
  
  <p>Any idea????</p>