Search
 
SCRIPT & CODE EXAMPLE
 

PHP

get the string after a character in php

$data = "123_String";    
$whatIWant = substr($data, strpos($data, "_") + 1);    
echo $whatIWant;
Comment

get words after string in in php

$string = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla felis diam, mattis id elementum eget, ullamcorper et purus.";
$prefix = "Nulla";
$index = strpos($string, $prefix) + strlen($prefix);
$result = substr($string, $index);
Comment

get substring after character php

<?php
$my_url = 'http://www.example.com/5478631';
echo substr($my_url, strrpos($my_url, '/' )+1)."
";
?>
  // print: 5478631
Comment

PREVIOUS NEXT
Code Example
Php :: findorfail laravel 
Php :: laravel show routes artisan 
Php :: rewrite .php to no extension 
Php :: laravel random query 
Php :: laravel seed migrate 
Php :: wordpress loop permalink 
Php :: php function to remove underscore 
Php :: laravel/ui v3.0.0 requires php ^7.3 - your php version (8.0.2) does not satisfy that requirement. 
Php :: laravel 8 db like query 
Php :: specified key was too long; max key length is 767 bytes (s 
Php :: hide wordpress error 
Php :: php strict-origin-when-cross-origin 
Php :: hide php extension htaccess 
Php :: ucfirst() php 
Php :: last insert id model codeigniter 
Php :: php check if file is video 
Php :: find word in text in laravel 
Php :: check the php version in ubuntu 
Php :: php 3 digit decimal 
Php :: php curl post json 
Php :: get custom field 
Php :: laravel publish email template 
Php :: error log array 
Php :: In Connection.php line 664:SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema 
Php :: php get url path name 
Php :: laravel check auth 
Php :: laravel inline if 
Php :: for loop php 
Php :: laravel rename column 
Php :: display errors in codeigniter 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =