Forum Moderators: coopster
This is the botton bit of the function... how do I echo it to the table..considering i have used another function before with the same variable to the below html table please. I know the answer should not be $cars by itself. Its a botton piece of a function code.
echo " </tr>\n";
echo " <tr>\n";
echo " <td>vehicles</td>\n";
echo " <td bgcolor=\"#CCFF99\"> </td>\n";
echo " </tr>\n";
echo " </tr>\n";
echo " </table>\n";
Do you mean something like this:
echo food($cars); //food() must have a return value!
echo " </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td>vehicles</td>\n";
echo " <td bgcolor=\"#CCFF99\"> </td>\n";
echo " </tr>\n";
echo " </tr>\n";
echo " </table>\n";
I hope this answers your question. good luck!
eelix
switch ($cars) {
case "white":
$pricestr = " This white car will cost £6.00 plust VAT\n" ;
break;
case "blue":
$pricestr = " Blue our latest speciality will cost £7.00 plus VAT\n" ;
break;
case "grey":
$pricestr = " grey will cost £8.00 plus VAT\n" ;
break;
case "orange":
$pricestr = " orange will cost £7.50 plust VAT.\n" ;
break;
}
return $pricestr;
}
echo vehicle($cars);
?>
i want to echo the results precisely in a specific table space above.
echo "<td bgcolor='#CCFF99'>".food($cars)."</td>\n";
eelix