array_pad is the only valid answer in this thread, all others are ugly hacks that can explode into your face. With array_pad you can always be sure that the amount of elements is correct and filled.
Especially important when using with a list() type output.