I’m trying to replace some characters from a string using
str_pad and I can’t get it to work at all and I have no idea why it doesn’t work.
<?php $t = "abcdefghij"; $t = str_pad($t, 4, "0"); echo $t; ?>
I also tried:
$t = sprintf("%04x", $t);
Which results in: