rkb/convert_to_ordinal

This package has converted any valid number and string to it's ordinal number.

dev-master 2020-04-09 20:48 UTC

This package is auto-updated.

Last update: 2025-06-17 22:14:11 UTC


README

  • This package has converted any valid number and string to it's ordinal number.

Installation

use composer require rkb/convert_to_ordinal to install

Usage

include './vendor/autoload.php';

$data = new App\OrdinalNumber();

$value = 1441;

$value = "4    4,4,55,55,1441";

echo ($data->ordinal_convert($value));

Output

     "1st",
     "2nd",
     "3rd",
     "4th",
     "5th",
     "6th",
     "7th",
     "8th",
     "9th",
     "10th",