Exemple #1
0
 function add($value, $pos = false)
 {
     if (!$pos) {
         array_push(self::$sections, $value);
     } else {
         $new = array();
         foreach (self::$sections as $k => $v) {
             $new[] = $v;
             if ($k == $pos) {
                 $new[] = $value;
             }
         }
         self::$sections = array();
         self::$sections = $new;
     }
 }