Function __global->get_ordinal_suffix

Definitions

sources/lang.php

  • Get the ordinal suffix (e.g. nd, rd, st) for a number.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$index integer No No required parameter N/A N/A Number to do this for

Returns

  • The suffix
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get the ordinal suffix (e.g. nd, rd, st) for a number.
 *
 * @param  integer $index Number to do this for
 * @return string The suffix
 */

function get_ordinal_suffix(int $index) : string