Does anyone know how to convert an ordinal to a cardinal number in PHP? -
I know that there is a way of making a gradual number in sequentially, though I can use it for this, I I would like to go in the other direction.
Current, (I do not have a very good solution in the opinion) I have to do the following
convert functionordial cardinal ($ word) {$ ordinals = array (); {$ Ordinals [NumberFormatter :: Format ($ i, NumberFormatter :: ORDINAL)] = $ i; for $ (= $ I = 1; $ i & lt; = 100; $ i ++) } $ Ordering $ [$ word]; }
Comments
Post a Comment