Search
 
SCRIPT & CODE EXAMPLE
 

PHP

PHP filter_var() Function

<?php
$str = "<h1>Hello World!</h1>";
$newstr = filter_var($str, FILTER_SANITIZE_STRING);
echo $newstr;
?>
Comment

filter var php function

// filter_var() function  used to filters a variable                                      
//with the help of a specified filter . 
// in php language we use filter_var() To validate data such as email , ipAdress .etc.
// syntax  is filte_var($varName , FILTER_VALIDATE_EMAIL );
//example 
$email ="test@gmail.com";
  if(filter_var($email, FILTER_VALIDATE_EMAIL){
    echo" email adresse is valid   "; 
    
    else{
      
      echo " the email adresse is not valid " ; }

Comment

PREVIOUS NEXT
Code Example
Php :: route codeigniter 
Php :: php array_push in foreach duplicate 
Php :: php null 
Php :: add brackets to string php 
Php :: get post id contact form 7 
Php :: php append n time pattern to string 
Php :: php number format without rounding 
Php :: read xml file in php wordpress 
Php :: sendmail php 
Php :: minishlink/web-push v5.2.5 requires ext-gmp * 
Php :: the uploaded file exceeds the upload_max_filesize directive in php.ini. wordpress 
Php :: worpdress pods taxonomy get custom field 
Php :: - in php 
Php :: php sort array remove keys 
Php :: php difference between two dates in seconds 
Php :: Invalid argument supplied for foreach() in C 
Php :: tinker faker 
Php :: laravel ecommerce 
Php :: orwhere in wherehas laravel 
Php :: php file upload ajax 
Php :: laravel get second last record 
Php :: PHP | Send Attachment With Email 
Php :: how to assign variable in php 
Php :: toastr in php 
Php :: substr php 
Php :: php get user county 
Php :: laravel sharing data 
Php :: laravel function 
Php :: contact form 7 in page template 
Php :: php library to convert html to amp 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =