title: Array from php to html input to JS
body: <p>Here's what i'm trying to accomplish. Insert an array from php into an HTML form and then have that array be pushed in a JS array.</p>
  
  <p>PHP</p>
  
  <pre><code>        $proxiearray = array();             
          if($row7['attribute_0'] != NULL) { array_push($proxiearray,$row7['attribute_0']);}
          if($row7['attribute_1'] != NULL) { array_push($proxiearray,$row7['attribute_1']);}
  
          &lt;input type="hidden" class="proxie_attributes" value="'.htmlspecialchars(json_encode($proxiearray)).'"&gt;
  </code></pre>
  
  <p>Now what i want with that is on uppon a certain task on the client side for my JS to take that aray and push it in another one.</p>
  
  <p>JS</p>
  
  <pre><code>attributesArray[counter] = new Array();
  if(proxiearray) { attributesArray[counter] = proxiearray; }
  </code></pre>
  
  <p>If i alert the array i get
  <code>["1","4"],5,6</code></p>
  
  <p>This just pushed in the array the <code>["1","4"]</code> but what i would want it to push is have a result like
  <code>1,4,5,6</code></p>
  
  <p>I know i could go with X amount of inputs although that is not a solution since i may have to use a bigger ammount of attributes in the future.</p>
  
  <p>EDIT: The <code>alert</code> is on the <code>attributesArray</code>.
  The <code>attributesArray[counter]</code> alert is <code>["1","4"]</code></p>