On a few hundred of lines I call a foreach quite a few times
(Checking img file)
It works fine in a multiple files environment
But if the user enters only one element then the foreach runs one too many time and adds an empty element
How could I go around that problem, do I have to set a switch and check for values in order to serve a foreach or a non-foreach snippet?
(Checking img file)
It works fine in a multiple files environment
But if the user enters only one element then the foreach runs one too many time and adds an empty element
How could I go around that problem, do I have to set a switch and check for values in order to serve a foreach or a non-foreach snippet?