I've two variables named $dagnum and '$maandnum. Sometimes they exist out 1 number and sometimes 2. But I need them always to have 2. So if $dagnum is 5, it needs to be 05, and if $maandnum is 3, it needs to be 03. Anyone who can help?
strlen();
I think you are trying to create a string from a number. If this is the case, the you can use this:
$number = 5; $string = "0".$number;
echo $string;
fLIPIS
No, thats not the correct way to do it, just do this:
$varName = sprintf("%02d", $someNumber);