Multiplying

Hey,

I am using PayPal’s IPN and when I receive a payment it creates an account, e-mails them, etc. The thing is, if they purchase in a larger quantity then it won’t send all of the e-mails. So my question is-

How can I multiply the whole process by a quantity. I.E-

$qty = 4

if ($item_name = “Kirupa Account”){

do stuff $qty times

}

I hope that is clear and all help will be appreciated.

Thanks,
Peter