Method I
echo str_pad( "3", 4, "0", STR_PAD_LEFT );Input $s_number = "3"; Output: 0003
Method II
$s_number = '12';printf("%04d", $s_number);
Input $s_number = "12"; Output: 0012
Html, JAVA,DOTNET,Javascript, PHP, and JQuery Scripts and its issues with solutions
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>Feet/Inches ⇄...
No comments:
Post a Comment