This is a logical issue.
This line:
unset($pizza2[$i]);
decreases the length of your array every time you use unset. So in the fourth iteration it has array count==3 and $i==3, so it exits from the loop.
You need to get the count into a variable before you unset arrays, and use the variable in the loop.
Like this:
$pizza = "piece1 piece2 piece3 piece4 piece5 piece6";
$pizza2 = explode(" ",$pizza);
print_r($pizza2 );
$len = count($pizza2);
for($i = 0; $i<$len; $i++)
{
//echo "<b>$i</b>";
echo "Array #".$i." is: <b>".$pizza2[$i]. "</b> ";
unset($pizza2[$i]);
}