Re-index an array


/ Published in: PHP
Save to your folder(s)

Re-indexes an array so that the array keys count up from zero. This is useful if you have previously removed some array nodes.


Copy this code and paste it in your HTML
  1. $my_arr = array_values($my_arr);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.