Horje

How to remove all numbers from string? PHP

I'd like to remove all numbers from a string [0-9]. I wrote this code that is working.
index.php
Example: PHP
<?php
$words = '१३३७ 11544 I love';
$words = preg_replace('/\d+/u', '', $words);
var_dump($words);
?>

Output should be:

How to remove all numbers from string? PHP




Type:
php
Category:
Web Tutorial
Sub Category:
PHP String Tutorial
Uploaded by:
Admin