Loading the input into a hash may be the way to go.
In reply to Re: Help translating into HTML by wfsp in thread Help translating into HTML by mrxg4