PHP: Words to Numeric

Posted: , By Patcoola

Script: words_to_numeric
Programming Language: PHP
Created Date: 2018-04-22

Purpose: Converts the spelled up form of a number to numbers.

Description: Changes the word form of a positive integer to its numeric value. Supports a value up to 99.


words_to_numeric ( string )

Example Usage:

ECHO words_to_numeric ( “twenty-two” );

Returns 22

Tags: ,

Comments:Write Comment

There are currently no comments for this post.

Leave a Comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

All comments are reviewed before publishing. Comments must be related to the page topic, must not be spam and must comply with the criminal code of Canada.