> I get the output
>
> Number is 0001000
> Shifted Number is 2000
>
> What am I missing?!?
$num = "0001000"; sets $num to be 1000, not 0001000 binary.
As I'm not sure if PHP has a binary type, you can use hex:
";
$num = $num << 1;
echo "
> One more thing... If I got '2001-09-01'
> Is there a fast way of incrementing the month of it?
> making it '2001-10-01' ?
list($year, $month, $day) = explode("-", $date);
$month++;
if ($month == 13)
$month = 1;
$date = "$year-$month-$day";
Eric O'Connel
--
PHP General Mailing List (http:
2 matches
Mail list logo