// COMBINE MANY SINGLE 1099 INTO 3-UP 1099s $fformtxt = ; // pdfill EXPORT TXT of SINGLE 1099 WITH [FIELDS] $fredtxt = ; // pdfill EXPORT TXT of 3-UP WITH [FIELDS] $redform = ; // PDF WITH NO BACKGROUND TO BE FILLED $f1099 = array(); // INPUT ARRAY OF SINGLE FILLED IN 1099s // $flds = getpdfvalues($fformtxt); $redtxt = file_get_contents($fredtxt); for ($i=0,$n=count($f1099) function getpdfvalues($fn,$trim='') { $txt = file_get_contents($fn); $lines = explode("\n",$txt); foreach ($lines as $i => $ln) if ($i > 0) { $a = explode("\t",$ln; $b[$fld=trim($a[0])] = $val = ($trim) ? trim($a[1],'[]') : $a[1]; } return($b); }