Hi there,
THis looks all long and messy, can someone suggest a better way to do it? Would it be better in an array? What sort of array, it works ok, just wondered if there was a better faster way to do it (just the "convert to letters" bit):
<?php
////////////////////////////////////////
///
/// Name: Equazen Fatty acid profle assessment
///
/// Author: Mike Pearce
/// Date: 22/03/01
///
/// Use: To determine the users fatty acid profile
/// by calobrating input data to determine a
/// sum total, then comparing that to the answers.
///
/////////////////////////////////////////////////
//Add all the scores together to get the sum totals
$physical = ($pa + $pb + $pc + $pd + $pe + $pf + $pg +$ph);
$visual = ($va + $vb + $vc + $vd + $ve);
$attention = ($aa + $ab + $ac + $ad + $ae + $af);
$mood = ($ma + $mb + $mc + $md + $me);
//Now convert the Number into letters that correspond to the answers. - Physical
if ($physical <= 5){
$physical = "a";
}elseif (($physical >5) && ($physical<=12)){
$physical = "b";
}else{
$physical = "c";}
//Now convert the Number into letters that correspond to the answers. - Visual
if ($visual <= 4){
$visual = "d";
}elseif (($visual >5) && ($visual<=9)){
$visual = "e";
}else{
$visual = "f";}
//Now convert the Number into letters that correspond to the answers. -Attention
if ($attention <= 4){
$attention = "g";
}elseif (($attention >5) && ($attention<=10)){
$attention = "h";
}else{
$attention = "i";}
//Now convert the Number into letters that correspond to the answers. -Mood
if ($mood <= 4){
$mood = "j";
}elseif (($mood >5) && ($mood <=9)){
$mood = "k";
}else{
$mood = "l";}