You're running
fetch
twice, once in each loop. if there's data to be found, then the first fetch will find it, so there's nothing left for the second to do. Try putting the final three echoes inside the first loop, renaming $shoes
to $types