in reply to Need Debug Help

You want to use semicolons, not commas, to sepearate the three clauses of your for statement. That is:

for ($ct=0; $cfg->param("FTP".$ct.".targetIP")!= ''; $ct++)