Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php escape special characters

/*  EXAMPLE:	<p>Bed & Breakfast</p>	-->	  <p>Bed &amp; Breakfast</p>  
    & 	&amp;
    " 	&quot; 				(unless ENT_NOQUOTES is set)
    ' 	&#039; or &apos; 	(ENT_QUOTES must be set)
    < 	&lt;
    > 	&gt;				*/

<?php
$new = htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES);
echo $new; 					// <a href='test'>Test</a>
?>
Comment

PREVIOUS NEXT
Code Example
Php :: datetime format laravel 
Php :: php sum array elements 
Php :: deprcation problem phpmyadmin ubuntu 
Php :: file original extensions laravel 
Php :: how can we use two php version in mac os 
Php :: Remove Downloads link from Woocommerce my account page 
Php :: is php still used 
Php :: laravel 8 plural singular 
Php :: check if post id exists wordpress 
Php :: 2 chiffres apres virgule php 
Php :: php current datettime us time zone 
Php :: php append file 
Php :: php strip tags 
Php :: use wordpress functions in external php file 
Php :: randomize question in laravel 
Php :: laravel download file 
Php :: update user meta wp code 
Php :: wordpress wpdb insert debug 
Php :: php get domain name from url 
Php :: php post curl json 
Php :: psicopata narcisista 
Php :: add softDelete in modeldata laravel 
Php :: php replace 
Php :: pasar variables con cronjob 
Php :: validate if correct image url php 
Php :: allow extension image chrome, firefox 
Php :: php check if string or number 
Php :: centos excecutable php 
Php :: php convert number to month 
Php :: php.ini location mac 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =