After a full day of attemping to port this PERL routine to PHP, I have given up on being able to do this myself, can anybody help?
Code:
for($y=1;$y<=100;$y++){
$thename="NAME_$y";
if(length(${$thename})>3){
$num++;
}
}
foreach($x=1; $x<=$num; $x++){
$qnt="QUANTITY_$x";
$prce="PRICE_$x";
$xtnd="XTEND_$x";
$ide="ID_$x";
$naam="NAME_$x";
$adlinfo="ADDTLINFO_$x";
${$naam}=~ s/\n//g;
$strMessageBody .= "Qty: ${$qnt} \nItem No: ${$ide} \nDescpition: ${$naam} \nAddtl. Info: ${$adlinfo} \nPrice: \$${$prce} Extended Price: \$${$xtnd} \n\n";
}
Comment