I created a function with str_pad for my site, but it is returning a blank value to me, could anyone help me?
function ret($valor, $tamanho, $orienta){
if($orienta == 0){
str_pad($valor, $tamanho, "0", STR_PAD_LEFT);
}
else{
str_pad($valor, $tamanho, " ", STR_PAD_RIGHT);
}
$teste = ret("37250468", 14, 0);
echo $teste;