I’m very much a beginner and am interested in learning simple
things which I can later apply for practical purposes. Example,
I’d like to pass the time as 2 digit hour to a string, meaning
I’d like what’s returned by strftime(’%H’); passed to my string.
<?php
$moda = strftime('%m%d');
$oldhr = strftime('%H');
$mnsc = strftime('%M%S');
echo "moda=$moda\n";
echo "oldhr=$oldhr\n";
echo "mnsc=$mnsc\n";
echo "newhr must also be printed\n";
echo "newhr must be 4 hrs earlier";
?>
Any useful suggestion for a beginner in php will be appreciated!
I’m running my scripts exclusively from windows cli for now.
With the helpful replies of 2 members I managed to resolve my
original issue ‘and more.’ Final objective is to make time 4 hrs
earlier, which I’ll work toward soon. Again, thank you members.