function fp_number_pad

7.x misc.inc fp_number_pad($number, $len)
6.x misc.inc fp_number_pad($number, $len)
4.x misc.inc fp_number_pad($number, $len)
5.x misc.inc fp_number_pad($number, $len)

Simple function to left padd numbers with 0's. 1 becomes 001 20 becomes 020 and so on.

Parameters

int $number:

int $n:

Return value

String

2 calls to fp_number_pad()
get_modules_menus in includes/misc.inc
Similar to get_modules_permissions, this will scan through all installed modules' hook_menu() functions, and assemble an array which is sorted by "location" and then by "weight".
get_term_description in includes/misc.inc
Convert a term ID into a description. Ex: 20095 = Spring of 2009.

File

includes/misc.inc, line 1624
This file contains misc functions for FlightPath

Code

function fp_number_pad($number, $len) {
  return str_pad((int) $number, $len, "0", STR_PAD_LEFT);
}