Posted By

koorb on 04/21/08


Tagged

php element textmate loop last flag


Versions (?)

Flag the last element of an array


 / Published in: PHP
 

  1. $keys = array_keys($array);
  2. if(!empty($keys)) {
  3. $last_key = array_pop($keys);
  4. $array[$last_key]['isLast'] = true;
  5. }

Report this snippet  

You need to login to post a comment.