How to remove character from specific position in string with PHP

1 Answer

0 votes
$s = "PHP Python Java C# C++"; 
 
$pos = 5;
$s = substr_replace($s, '', $pos, 1); 

echo $s;
 
 
 
     
/*
run:
 
PHP Pthon Java C# C++
          
*/

 



answered Oct 14, 2020 by avibootz
...