関数str_replaceを使い、特定の文字列をnullに置換する。
【PHP】
<?php $string = 'undel'; $string = str_replace('del', '', $string); echo $string; ?>
【出力結果】
un
※これを使って、サイトマップの親カテゴリのゼロ表記を消した。
関数str_replaceを使い、特定の文字列をnullに置換する。
【PHP】
<?php $string = 'undel'; $string = str_replace('del', '', $string); echo $string; ?>
【出力結果】
un
※これを使って、サイトマップの親カテゴリのゼロ表記を消した。