Return to prototypes
This php function converts a non decimal number like "10 1/2" to a decimal number "10.5".
The number entered must be in the format: "10-1/2" whole number first then fraction. With or without the hyphen.
The function converts these fractions to decimal: 1/4, 1/2 (more fractions can be added)
Also, the function does not have a problem with 'words' that are mixed in.
Example: "Shoes 10 1/2 Red"
The idea is to run the text in the search box through this function first, to convert fractions to decimals,
then allow the text to go to your search engine.
Type something: