Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php remove all but numbers

// Original SOA
preg_replace('/[^0-9]/', '', '604-619-5135'); // Removes the dahses in 604-619-5135

preg_replace('/[^0-9]/', '', '7#sq7k*77dql'); // = 7777
Comment

PREVIOUS NEXT
Code Example
Php :: php truncate string 
Php :: php array has value 
Php :: pdo fetch 
Php :: phpspreadsheet setcellvalue row background color 
Php :: laravel vendor publish all files 
Php :: laravel not finding asset files in public directory 
Php :: carbon time ago laravel 
Php :: Check duplicate email using Jquery validation in laravel 
Php :: php get age from dob 
Php :: php alert 
Php :: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `users` add index `users_userable_type_userable_id_index`(`userable_type`, `userable_id`) 
Php :: validate audio file in laravel 
Php :: Date and Time PHP Continued 
Php :: getting current timestamp in php 
Php :: add action wp_footer 
Php :: file original extensions laravel 
Php :: twig dd 
Php :: laravel where between cluse 
Php :: laravel migration column type json 
Php :: check image exist or not in laravel 
Php :: php string replace space 
Php :: how to update all row in laravel 
Php :: only alphanumeric characters are allowed regex in php 
Php :: wordpress wpdb insert debug 
Php :: laravel abort_if 
Php :: delete record php mysqli 
Php :: capitlise php 
Php :: change php version in ubuntu 
Php :: get the last inserted id using laravel eloquent 
Php :: laravel orwhere 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =