Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php preg_quote

<?php
$keywords = '$40 pour un g3/400';
$keywords = preg_quote($keywords, '/');
echo $keywords; // retourne $40 pour un g3/400
?>

<?php
// Dans cet exemple, preg_quote($word) sert à éviter que les astérisques
// prennent une valeur particulière dans l'expression rationnelle.

$textbody = "Ce livre est *très* difficile à trouver.";
$word = "*très*";
$textbody = preg_replace ("/" . preg_quote($word, '/') . "/", 
                          "<i>" . $word . "</i>",
                          $textbody);
?>
Comment

PREVIOUS NEXT
Code Example
Php :: active page in laravel 
Php :: Hide Add to cart button on specific products 
Php :: php try to decode json 
Php :: laravel create many 
Php :: getimagesize php 
Php :: laravel controller constructor auth user null 
Php :: array_chunk in php 
Php :: php switch case greater than 
Php :: download file laravel s3 
Php :: php docs comments 
Php :: php aes 
Php :: comment split une chaine de caratere en php 
Php :: object oriented programming php 
Php :: php array push 
Php :: laravel file uploads 
Php :: custom fields wordpress 
Php :: ::latest() 
Php :: laravel collection to array 
Php :: create new record via model in laravel 
Php :: install execute array in php 
Php :: auto refresh extintion php 
Php :: sanctum laravel 
Php :: laravel unique id 
Php :: laravel has many limit 
Php :: Try raising max_execution_time setting in php.ini file (CentOS path is /etc/php.ini): max_execution_time = 300Fix 504 Gateway Timeout using Nginx 
Php :: how to fetch all user data form user in wp 
Php :: convert to string php 
Php :: php return associative array 
Php :: mixed content laravel form target 
Php :: enable trash for media wordpress 
ADD CONTENT
Topic
Content
Source link
Name
6+1 =