アーカイブ:2014年 1月 21日
文字列を指定の形式にフォーマットする(Smarty)
![](https://univetech.com/cosmo-wp/wp-content/plugins/lazy-load/images/1x1.trans.gif.pagespeed.ce.2JdGiI2i2V.gif)
Smartyにおける文字列、特に数値を含む文字列の出力形式を指定する方法。「string_format」を使う。具体的には次のように記述する{$num_str|string_for…
詳細を見るPHP-数値を文字列として表示する
![](https://univetech.com/cosmo-wp/wp-content/plugins/lazy-load/images/1x1.trans.gif.pagespeed.ce.2JdGiI2i2V.gif)
型変換(数値⇔文字列)のまとめ■数値を文字列に$a = 123456789;$str = strval($a); // '123456789'■intval 文字列を数値に$str = "1234";…
詳細を見るEC-CUBEをカスタマイズするときのデバッグ表示
![](https://univetech.com/cosmo-wp/wp-content/themes/blogpress_tcd10/img/common/no_image1.gif.pagespeed.ce.paA5GVFLtg.gif)
EC-CUBEをカスタマイズしているとき、この変数に入っているものはなんだろう~?と調べたいとき。SC_Utils::sfPrintR()を使うと、非常に便利。$temp_val = "abc";SC_U…
詳細を見る