title: Remove leading 0 from date and month in array PHP
body: <p>i have an array in php like this:</p>
  
  <pre><code>array(3) {
      [0]=&gt;
        string(4) "2019"     // year
      [1]=&gt;
        string(2) "07"       //month
      [2]=&gt;
        string(2) "02"       //day
   }
  </code></pre>
  
  <p>i want to remove leading 0 from my day and month field and get back another array with new values. i have used <code>number_format()</code> but i don't know how to use it with array.</p>
  
  <p>New Output should be:-</p>
  
  <pre><code>array(3) {
     [0]=&gt;
        string(4) "2019"   //year
     [1]=&gt;
        string(2) "7"   //month
     [2]=&gt;
        string(2) "2"   // day
    }
  </code></pre>
  
  <p>Any help will be highly appreciated.</p>