I have a string 'some value' and I am looking for the function that replaces certain values with another one.
For example I need the
'some value'
to become
'some_value'
This is what I have tried so far with no luck
$newCategory=str_replace(' ', '_', $rows["category"]);
echo $newCategory;
echobefore$newCategory=str_replace(' ', '_', $rows["category"]);