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 :: laravel firstorfail 
Php :: laravel list all routes 
Php :: php if url contains 
Php :: show all terms of a custom taxonomy 
Php :: refresh seeder laravel 
Php :: php artisan migrate create table 
Php :: {{Str::limit laravel 
Php :: your requirements could not be resolved to an installable set of packages. composer 
Php :: carbon start of week minus one day 
Php :: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`)) 
Php :: how uninstall the laravel 
Php :: laravel debugbar 
Php :: php how to get am pm from a datetime 
Php :: php check if parameter exists 
Php :: codeigniter last insert id 
Php :: date casting from datetime to d-m-Y laravel 
Php :: clear log file laravel command 
Php :: php pluck from array of objects 
Php :: php content type xml 
Php :: php remove quotes 
Php :: wordpress enqueue style child theme 
Php :: php delete session 
Php :: error log php array 
Php :: How to display the fps in pygame 
Php :: Root composer.json requires php ^7.2.5 but your php version (8.0.3) does not satisfy that require 
Php :: wp wc php if cart page is empty redirect 
Php :: time to load php page 
Php :: get author display name wordpress 
Php :: var_dump beautifier 
Php :: remove all html codes using php 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =