phpを勉強中です!!
Mac使ってます!!
ーー【困っていること】ーー
最後のカンマを取りたい!!
<?php //改行あり $output_str = "id,year,month,day,content 2,2017,7,6,仕事,"; //文字数を抽出 $length = mb_strlen($output_str); //最後のカンマを除いて抽出 $output̲str = mb_substr($output_str, 0, $length-1); echo('<pre>'); var_dump($output_str); echo('</pre>'); ?>
すみませんがよろしくお願いします。
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/08/03 11:00
2017/08/03 11:12