0

私のウェブサイトは次のコードを使用しています。

$a1="1293011062"; // hex code umm i think !
$expires = date('M d, Y', $a1);
echo $expires; // Output Dec 22, 2010

どうすれば逆の操作ができますか?Apr 06, 2012つまり、16進数に変換したい場合、それがで表される方法はどうなりa1ますか?

4

1 に答える 1

1

strtotimeを使用できます:http://us2.php.net/strtotimeそしてそれは16進ではありません

<?php
$a1="1293004800";
$expires = date('M d, Y', $a1);
echo $expires . "<br/>"; // Output Dec 22, 2010

echo strtotime($expires); // 1293004800
?>
于 2012-04-06T17:55:46.777 に答える