|
Friday, 20 March 2009
|
|
HTML clipboard
In this tutorial we'll make number format like 0001, 0002, 0003 in stead of
1, 2 ,3. It's very easy to do this for your counter, category or product ID.
etc.
number_format.php
Source Code:
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<?
$num = 1;
printf("%03d", $num);
?>
<hr />
<?
for($num=5;$num<=15;$num++){
printf("%04d", $num);
echo "<br/>";
}
?>
</body>
</html>
|