Search
 
SCRIPT & CODE EXAMPLE
 

PHP

remove comma in numeric in php

$var = 18,542.00;
$var = intval(preg_replace('/[^d.]/', '', $var));
result :- 18542;
or if you need float
$var = floatval(preg_replace('/[^d.]/', '', $var));
result :- 18542.00;
Comment

PREVIOUS NEXT
Code Example
Php :: reset wp query 
Php :: php compare two dates 
Php :: key of last element php 
Php :: laravel response redirect 
Php :: laravel old request htmlselect 
Php :: laravel clear all cache 
Php :: php error reporting show warnings 
Php :: how to check the laravel version mac 
Php :: include external php file in html 
Php :: remove duplicate values in array php 
Php :: get data in orderby in laravel 
Php :: codeigniter dump query 
Php :: determine special characters in php 
Php :: php find word in string 
Php :: where not in laravel 
Php :: wp limit post revisions 
Php :: laravel get last record 
Php :: laravel 404 not found not showing error 
Php :: php yesterday 
Php :: php ip address of visitor 
Php :: laravel migration rollback 
Php :: the configuration file now needs a secret passphrase (blowfish_secret) 
Php :: Get PHP Date Time Difference in Days, Hours, Minutes, and Seconds 
Php :: change php version linux nginx 
Php :: php get filename without extension 
Php :: Connecting to the database using mysqli 
Php :: get category name by id wordpress 
Php :: phpspreadsheet setcellvalue row background color 
Php :: ext-dom php 7.2 
Php :: In php, how to convert string value into an int 
ADD CONTENT
Topic
Content
Source link
Name
3+7 =