in reply to Re: looking for suggestion!!!in thread looking for suggestion!!!
Given the usage in the OP's code $total_element is the number of element rather than the largest index - this is why C style for loops are so prone to off by 1 errors. ;-)