PHP FILTER_SANITIZE_NUMBER_INT Filter
Complete PHP Filter Reference
Definition and Usage
The FILTER_SANITIZE_NUMBER_INT filter removes all illegal characters from a
number.
This filter allows digits and . + -
- Name: "number_int"
- ID-number: 519
Example
<?php
$number="5-2+3pp";
var_dump(filter_var($number, FILTER_SANITIZE_NUMBER_INT));
?>
|
The output of the code will be:
Complete PHP Filter Reference
Click here to design a Stunning Flash Website for Free
Wix is a revolutionary web design tool that provides anyone with the possibility to create professional and beautiful websites for free.
With e-commerce features, search engine visibility and many more professional tools, Wix is the ultimate solution for creating a spectacular site while saving tons of money.
|