I have the following line in one of my php scripts:
$newserial=str_repeat('X', strlen($serial) - 4) . substr($serial, -4);
It replaces each character in a string with an "X" except for the last four. Now I want it to be the other way. I only want it to replace the last four characters of a string with the "X", but keep the rest of the data. Each record has a different size string value. Can somebody help me with what needs to be changed in that line?
Thanks,
Jeff