How to remove semicolon from string in PHP

1 Answer

0 votes
$s = "php; java; c; c++";
 
$s = str_replace(';', '', $s);
 
echo $s;
 
 
 
 
/*
run:
 
php java c c++
 
*/

 



answered May 18, 2021 by avibootz

Related questions

2 answers 195 views
2 answers 188 views
1 answer 131 views
1 answer 123 views
1 answer 140 views
1 answer 141 views
2 answers 161 views
...