'; $mathml=true; }else{ // BROWSER PROBABLY DOESN'T SUPPORT MATHML $contenttype='text/html'; $header=' '; $mathml=false; } // PRINTS EITHER AN IMAGE OF THE EQUATION OR THE MATHML CONTENT function mathml($image,$math,$description){ global $mathml; echo ($mathml) ? $math : ''.$description.''; } // IF THEY CAN'T VIEW MATHML, LET THEM KNOW THE AVAILABLE OPTIONS function mathmlwarning(){ global $mathml; if(!$mathml){ return '

This document contains mathematical equations. If you are using Internet Explorer you will need to download the MathPlayer plugin to view them correctly. Alternatively you can use Firefox or Netscape.

'; } } // SETTING THE charset IN THIS HEADER CALL CAUSES IT TO BE DISPLAYED // AS A DOCUMENT TREE IN INTERNET EXPLORER WITH MATHPLAYER header("content-type: $contenttype"); echo $header; ?> MathML Example x = - b ± b 2 - 4 a c 2 a EOQ; mathml("quadratic_equation",$math,"Quadratic Formula"); ?>

Quadratic Formula