in reply to Array extraction and separate returns

Why can't you use two arrays, one for <SIDX> and one for <SIDX2>? If the results from the two files are going to two different places why not keep them seperate to start with? Yes this means You'll have to do two searches, one on each array. The only other idea I have is when you join the two lines into the array, have some known character divider (i.e. ":") and just split the result on that character.
  • Comment on Re: Array extraction and separate returns

Replies are listed 'Best First'.
Re: Re: Array extraction and separate returns
by Dente (Acolyte) on May 26, 2004 at 23:58 UTC
    Upon further examination, I have concluded that what i really need is an loop statement stating that if the keywords are found in <SIDX> then this:
    $main_template =~ s/%%keywords%%/$fields{'keywords'}/g; $main_template =~ s/%%searcresults%%/$pitem/g;
    and if the keywords are found in <SIDX2> then this:
    $main_template =~ s/%%keywords%%/$fields{'keywords'}/g; $main_template =~ s/%%premiumresults%%/$pitem/g; print "Content-type: text/html\n\n"; $main_template = tseek::insert_tmpl_includes($main_template); print "$main_template"; exit;