$str = 'In My Cart : 11 items';
$int = (int) filter_var($str, FILTER_SANITIZE_NUMBER_INT);
## CHECK IF INPUT IS NUMBER ONLY
$number = "12345";
is_numeric($number); ## RETURNS TRUE IF NUMBER ONLY, ELSE FALSE
Code Example |
---|
Php :: php http build query |
Php :: Where is the php.ini file on a Linux/CentOS |
Php :: validate year laravel |
Php :: install php7.4 in linux server |
Php :: php mkdir if not exists |
Php :: laravel insert or ignore |
Php :: check if logged laravel |
Php :: get current date laravel |
Php :: How to always use ignore-platform-reqs flag when running composer? |
Php :: time to load php page |
Php :: get featured image url in wordpress |
Php :: string to slug php |
Php :: wordpress https too many redirects |
Php :: php sha256 example |
Php :: validator number laravel |
Php :: wp php related post by category |
Php :: php close window after script runs |
Php :: strtolower php |
Php :: laravel password verification |
Php :: php decode html special characters |
Php :: carbon day 30 days ago |
Php :: array con php |
Php :: php newline |
Php :: laravel db transaction |
Php :: Drupal 9 cache killer kill switch |
Php :: php move file |
Php :: ext-dom php 7.2 |
Php :: reindex array php |
Php :: array merge php |
Php :: redirect php |