This is What I Have - Huawei MatePad 11 (2021)
This is what I want - Huawei-MatePad-11-2021
This is what I have done so far. (only it replaces "white space" with "-".
echo preg_replace('/[[:space:]]+/', '-', $test);
I want to remove parentheses, and want to replace "white space" with "-" at once. How to do it?
$text = 'Huawei MatePad 11 (2021)';
$text = preg_replace('/[(|)]/', '', preg_replace('/\s+/', '-', $text));
echo($text);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With