Filters out empty strings when using explode so the for loop doesn't add an empty value.