public static function explode($separator, $data, $number = null, $callback = 'array_push')
    {
        if ($number) {
            $array = explode($separator, $data, $number);
        } else {
            $array = explode($separator, $data);
        }

        if (count($array) < $number) {
            foreach (range(1, $number - count($array)) as $i) {
                $callback($array, null);
            }
        }

        return $array;
    }
public static function explode($separator, $data, $number = null, $callback = 'array_push')
    {
        if ($number) {
            $array = explode($separator, $data, $number);
        } else {
            $array = explode($separator, $data);
        }

        if (count($array) < $number) {
            foreach (range(1, $number - count($array)) as $i) {
                $callback($array, null);
            }
        }

        return $array;
    }
public static function explode ( $ separator , $ data , $ number = null , $ callback = 'array_push' ) { if ( $ number ) { $ array = explode ( $ separator , $ data , $ number ) ; } else { $ array = explode ( $ separator , $ data ) ; } if ( count ( $ array ) < $ number ) { foreach ( range ( 1 , $ number - count ( $ array ) ) as $ i ) { $ callback ( $ array , null ) ; } } return $ array ; }
Explode a string and force elements number.

@param string $separator
@param string $data
@param int    $number
@param string $callback

@return array
Explode a string and force elements number .