2013-02-26 rtrimの第二引数 PHP PHP: rtrim - Manual rtrimの第二引数で削除する文字を指定できる <?php $hoge = "hoge/hoge/hoge/"; print_r(rtrim($hoge, "/")); // hoge/hoge/hoge