Php change - and _ in a string using function str_replace
<?php
$var="my-name_saddam ";
$var=str_replace("-"," ", $var);
$var=str_replace("_"," ", $var);
?>
<?=$var?>
<?php
$var="my-name_saddam ";
$var=str_replace("-"," ", $var);
$var=str_replace("_"," ", $var);
?>
<?=$var?>
Comments
Post a Comment