Search
 
SCRIPT & CODE EXAMPLE
 

PHP

subtract string php

//if you know what stirng you want to subtact then use
// str_replace($search, $replace, $subject)
$x =  "Hi, I am uzair and I am a php dev.";
echo str_replace("and I am a php dev.", "",$x);

/**
or
if you don't know and what to subtract just last two characters or 
5 ch at the begning etc then use substr()
**/ 
  
$rest = substr("abcdef", -1);    // returns "f"
$rest = substr("abcdef", -2);    // returns "ef"
$rest = substr("abcdef", -3, 1); // returns "d"

  
Comment

PREVIOUS NEXT
Code Example
Php :: laravel starter kit installation 
Php :: prevent xss php 
Php :: Unable to connect with STARTTLS: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed 
Php :: is dir php 
Php :: get array length using php 
Php :: how to store file in public folder laravel 
Php :: get woocommerce product category link by id 
Php :: register sidebar wordpress 
Php :: phpspreadsheet set cell by column and row 
Php :: Woocommerce - Adding a Custom Endpoint 
Php :: ternary expressions php 
Php :: add css to gutenberg editor 
Php :: regex get text between braces 
Php :: how to join two tables in laravel 
Php :: laravel update return updated row, laravel update return 
Php :: wp get_posts return ids 
Php :: illuminate/container requires php your php version (X.X.XX) does not satisfy that requirement. 
Php :: in laravel date duration validation rule 
Php :: laravel blade loop if 
Php :: laravel create project 
Php :: php mysql prepare query 
Php :: laravel distinct not working 
Php :: get user information woocommerce 
Php :: php array sum 
Php :: wordpress log errors 
Php :: how to use php to print inside html 
Php :: make project in laravel 7 
Php :: a facade root has not been set laravel 7 
Php :: PHP filter_var() Function 
Php :: wordpress theme widgets 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =