LoginSignup
60
39

More than 5 years have passed since last update.

phpで文字列中の特定文字を削除

Posted at
<?php
$str = 'abcde';
$str = str_replace('ab', '', $str);
echo $str; // -> cde
?>

phpで文字列中の @ を消したくて試行錯誤して、凄く簡単な方法で解決したのでメモしました。

60
39
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
60
39