Hey All,
The Following will return '2006-2-Joe' when I need '2006-02-Joe'
//for context, $curName would be something like 2006-01-Joe through 2006-13-Joe
//where '01 & 13 are NOT DATES.
//$userString = substr($curName, -8);
//$periodString = substr($curName, 5, 2);
// so for arguement sake say that...
$Y = date('Y');
$periodString='01';
$userString='Joe';
$time_to_update_template = $today;
if ($time_to_update_template = $today){
$periodString+=1;
$newTemplate = "$Y.'-'.$periodString.'-'.$userString";
}
// which will return '2006-2-Joe' and not '2006-02-Joe'
Please,
How do I fix it so I get 01-09?
How do I set it so that it starts over after 13 (or on the new year)?
cause I can't seem make this...
$period=1;
while($i<=13)
{
$period++;
}
...work for me in this context:eek: