function ObjList::insert_after_index

7.x ObjList.php ObjList::insert_after_index($new_i, $obj_c)
6.x ObjList.php ObjList::insert_after_index($new_i, $obj_c)
4.x ObjList.php ObjList::insert_after_index($new_i, $obj_c)
5.x ObjList.php ObjList::insert_after_index($new_i, $obj_c)

File

classes/ObjList.php, line 126

Class

ObjList

Code

function insert_after_index($new_i, $obj_c) 
 {
  $rtn = new ObjList();
  for ($t = 0; $t < $new_i; $t++) 
   {
    $rtn->add($this->array_list [$t]);
  }

  $rtn->add($obj_c);

  for ($t = $new_i; $t < count($this->array_list); $t++) 
   {
    $rtn->add($this->array_list [$t]);
  }

  $this->array_list = $rtn->array_list;
  $this->count = count($this->array_list);

}