Sorry if this has been done, but I couldn't find it here.
I need to have a number, add 1 to it for one result and subtract 1 for another. But I need the 1 value to be 001, the ten value to be 010, and etc up to 999. (I'll work in the stop later)
if ($pc != "001") {
$pcp = $pc - 1;
$pcn = $pc + 1;
}
else {
$pcp = "001";
$pcn = $pc + 1;
}
What that gives me for $pcn if $pc = 001 is 2. I need it to be 002. I've dug through my notes and through this help doc I got at php.net, but I can't find anything helpful.
I know it's silly, but it's for a file naming convention that works great elsewhere.
Thanks