Search
 
SCRIPT & CODE EXAMPLE
 

PHP

remove symbolsand spaces php

preg_replace('/[^A-Za-z0-9]/', "", $data)
Comment

removed spacel caracter using php

<?php
$string = "DelftStack is a best platform.....";
echo "Output:  " . rtrim($string, ".");
?>
  Output: DelftStack is a best platform
Comment

removed spacel caracter using php

<?php
$mainstr = "@@PHP@Programming!!!.";
echo "Text before remove:
" . $mainstr;
echo "

Text after remove: 
" . trim($mainstr, '@!.');
?>
Comment

removed spacel caracter using php

<?php
$mainstr = "<h2>Welcome to <b>PHPWorld</b></h2>";

echo "Text before remove: 
" . $mainstr;

echo "

Text after remove: 
" .
    str_ireplace(array('&lt;b&gt;', '&lt;/b&gt;', '&lt;h2&gt;', '&lt;/h2&gt;'), '',
    htmlspecialchars($mainstr));
?>
 output: 
  Text before remove: 
<h2>Welcome to <b>PHPWorld</b></h2>

Text after remove: 
Welcome to PHPWorld
Comment

removed spacel caracter using php

<?php
$strTemplate = "My name is :name, not :name2.";
$strParams = [
    ':name' => 'Dave',
    'Dave' => ':name2 or :password',
    ':name2' => 'Steve',
    ':pass' => '7hf2348', ];
echo "
" . strtr($strTemplate, $strParams) . "
";
echo "
" . str_replace(array_keys($strParams), array_values($strParams), $strTemplate) . "
";


?>
  Output:

My name is Dave, not Steve.
My name is Steve or 7hf2348word, not Steve or 7hf2348word2.
Comment

PREVIOUS NEXT
Code Example
Php :: php array join 
Php :: toaster message in laravel 
Php :: convert string to array laravel 
Php :: laravel limit query pagination 
Php :: array to string conversion in php 
Php :: grenerating random text color for text for image php 
Php :: create empty 2d array php 
Php :: Woocommerce Display field value on the admin order edit page [Custom Field Display 2] 
Php :: php while loop of alphabet 
Php :: wp enqueue style for style.css 
Php :: laravel storage save file folder on disk 
Php :: ci db query error 
Php :: get order details by id woocommerce 
Php :: how to run php file in xampp 
Php :: php two decimal places 
Php :: custom post type 
Php :: convert to int php 
Php :: eliminar ultimo caracter string php 
Php :: get table name from model laravel 
Php :: - tijsverkoyen/css-to-inline-styles 2.2.3 requires ext-dom * - the requested PHP extension dom is missing from your system. 
Php :: php replace every occurrence of character in string 
Php :: php select from database into array 
Php :: wp get author description 
Php :: how do decode base64 php 
Php :: save array in mysql php 
Php :: laravel limit relationship result 
Php :: composer create project version 
Php :: php loop through array of objects 
Php :: get template directory uri 
Php :: random array php 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =