I'm having issues wrapping my brain around how to accomplish this.
Basically, as I go through a text document I have I get a comma separated line where there are two attributes then an image name. The next couple lines lack the two attributes but contain different image names. To the software I'm working with, these additional image named lines without the two attributes are related to the first line WITH the attributes. I would like to take the two attributes and assign them to the next lines that lack them... The number of images per "group" varies. It looks like this:
red, large, kitty1235.jpg ,, kitty1294.jpg ,, kitty3452.jpg orange, small, cuteface123.jpg ,,adorable544.jpg
...and what I am trying to do is:
red, large, kitty1235.jpg red, large, kitty1294.jpg red, large, kitty3452.jpg orange, small, cuteface123.jpg orange, small, adorable544.jpg
I know there has to be a way, I'm guessing I'm going to have to use an array but I'm a newb at that. Any help would be GRAND.
Thanks!