Php How Do I Loop Through But Replace Missing Data With

Php How Do I Loop Through But Replace Missing Data With