Search
 
SCRIPT & CODE EXAMPLE
 

PHP

remove space from string php

<?php
$stripped = str_replace(' ', '', "10 1000 0000 000");
echo $stripped;
Comment

php remove space before and after string

$words = '      my words     ';
$words = trim($words);
var_dump($words);
// string(8) "my words"
Comment

php remove space from string

<?php
$name = "Yeasin_ahammed_apon"
#str_replace('what u want to replace', 'with what ', $name);
str_replace('_', ' ', $name);
echo $name;
# output: Yeasin ahammed apon
?>
#str_replace('what u want to replace', 'with what ', $name);
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 :: laravel collection get price sum 
Php :: how to use sseders in laravel 
Php :: PHP Forward POST content into Python script 
Php :: get DAYS absent from working days from given date range 
Php :: PHP dynamic property name 
Php :: php artisan serve 
Php :: php file get content replacing & with &amp; 
Php :: img src php wordpress 
Php :: deserialize php 
Php :: phpspreadsheet password protected 
Php :: fecade Artisan:call laravel 
Php :: file get content using call api in php 
Php :: php loop through months 
Php :: php check credit card expiration 
Php :: alert a php variable 
Php :: how to get the last inserted id in laravel 
Php :: laravel blade short if 
Php :: wpml language switcher shortcode 
Php :: laravel 419 page expired on login 
Php :: composer create-project --prefer-dist laravel/laravel blog 
Php :: laravel dynamic page title 
Php :: get session id in laravel 
Php :: laravel get authorization bearer token 
Php :: remove % sign from string php 
Php :: laravel clear table 
Php :: laravel active nav 
Php :: jquery ajax 500 internal server error php 
Php :: wordpress throw to debug.log 
Php :: php function to convert string to camelcase 
Php :: laravel generate unique token 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =