title: How to add an object at the end of Multidimensional Arrays using JavaScript
body: <p>I have a question about adding objects in Multidimensional arrays.</p>
  
  <p>Please see picture below. 
  <a href="https://i.stack.imgur.com/Th5sr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Th5sr.png" alt="Picture"></a></p>
  
  <p>Here I have an image, description, N/A and number field.</p>
  
  <p><strong>What i want is to achieve this.</strong> </p>
  
  <p><a href="https://i.stack.imgur.com/Cc2VG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Cc2VG.png" alt="enter image description here"></a></p>
  
  <p>So user enter the number in a number field. and when click submit modal appear which shows this image, and all the number fields which user typed in. </p>
  
  <p>So I though multidimensional arrays should be good here. So on the change function so when user type something in number field, I also add that object in an array. </p>
  
  <p><strong>jquery</strong></p>
  
  <pre><code>    $(".clips-assign-val").change(function(){
  
          var arc_50 = $("#79").val();
          if (arc_50 &gt; 0 ){
              &lt;?php $clips = array (array("../../css/clip-bundles/miscellaneous-clips.png","40mm Square Clips","2","2"));?&gt;
          }
  
      });
  </code></pre>
  
  <p>What I was trying to do here is when user type in number field, on the change function, if number is more than 0, than I was trying to add the object in multidimensional arrays. But its not working.</p>
  
  <p>So what i want to do is when user type something in number field, and if number field is more than 0, add that row in array, so when user click submit, the modal comes up which shows user when he submitting. </p>
  
  <p>Many Thanks </p>