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 352 views
2 answers 320 views
1 answer 275 views
1 answer 266 views
1 answer 288 views
1 answer 281 views
2 answers 361 views
...