When you need to perform math in PHP on a user-inputted fraction, it's important to convert the fraction into a decimal. PHP's math functions can't be used on a text string such as "1/2," so you must convert it into the decimal "0.5." To parse the fr...
↧