HeHe...THAT is meant to replace the whole snippet, yes?
Thanks a million for your input on this
Since what I have now is this:
$timeLeft = $res->Item->TimeLeft;
$x =array(1 => 'Day', 'Hour', 'Minute');
//if using as quicktag in wordpress you must escape the backslashes because the quicktag insertion removes them.
preg_match('/\\AP(\\d*)T(?\\d*)H)?(?\\d*)M)?(\\d*)S\\z/x',$timeLeft, $d);
//preg_match('/\AP(\d*)T(?\d*)H)?(?\d*)M)?(\d*)S\z/x',$timeLeft, $d); //original code
for ($i = 1; $i < 4; $i++){
$dare .= $d[$i] ? $d[$i].' '.$x[$i].($d[$i] > 1 ? 's ' : ' ') :'';
}
Could it not be tweaked to add the display of seconds? Is there something about this code that is faulty?