PHP 月末の日付を取得するには
月末の日付を取得するには
date(“t”, strtotime(“2012-02-01”));
date(“t”, strtotime(“20120201”));
date(“t”, strtotime(“2012/02/01”));
dateのフォーマット文字tでその月の日数が取得できる。
関連記事
Twitter検索サイト「日本のつぶやき検索」を作りました
いまさらなんですが、 Twitter検索サイト「日本のつぶやき検索」を作ってみました。 検索条件は簡単に?設定できるようにしてみま...
CodeIgniter2.0.3 pg_escape_stringが変?
pg_escape_stringが変? CodeIgniter2.0.3で文字(1文字)をpg_escape_stringすると、お尻に半...
NetBeansでエラー「The cipher ‘aes256-cbc’ is required, but it is not available」
NetBeansで秘密鍵でサーバに接続しようとすると 「The cipher 'aes256-cbc' is required, but ...
Cannot access empty property エラーがでた。model.phpの978行目?
CakePHP(version 1.2.6)を使用していて、 Cannot access empty property というエラーがでた...
charsetにUTF-8を設定しても反映されない
htmlのcharsetにUTF-8を設定したのですが、IE・FireFoxで開いてみても UTF-8と認識してくれない。 サーバの問題...
PHP 連続するスペース(全角or半角)を1つの半角スペースに変換
連続するスペース(全角or半角)を1つの半角スペースに変換 プログラム <?php $words = "a c b...