I have a number of classes that generate a paragraph of text on a page. Different classes run different numbers of times - some may run only once, others may loop through a number of instances. Altogether this generates a page with several paragraphs.
What I want to do is include a spacer graphic before each paragraph, but not if it's the first paragraph (don't need space before the first paragraph). What I'd like to do is set a variable before the classes run (call it "$nospacer"), have the classes check the variable to see if it's set. If it is, don't include the spacer. This is easy enough using the "global" keyword.
After the first paragraph runs, I'd like to unset the variable from within the class. Can I do that?
Alternately, I could start with no variable set, then have each class return a variable - but that doesn't seem to be working either. Suggestions?
Thanks,
Bob