@ Opserty - The rebuild_equipment only goes through if the person clicks on the button to upgrade their equipment "if ($test->input['do'] == 'guard_shield')". Once they do that, it will change one of the values, so I used the rebuild to put them all back together after the change occurs.
$full_equipment[5] = 's:1:"8"';
You have changed part of the array there, so its changed fully. Theres no need to rebuild it using array() again. You can just implode it as you have done on the next line.