Thanks for your help.
Tried this, and $code appears to be empty. I've declared it outside the While loop, but it prints out as null. Should this contain the total substitutions?
Thanks for your help. Tried this, and $code appears to be empty. I've declared it outside the While loop, but it prints out as null. Should this contain the total substitutions?
Well, for one thing I wouldn't regard $code as a particularly good variable name. Then, if you want the total number of substitutions, you must accumulate them: