Answers for "get from string in php before and after character"

PHP
5

get the string after a character in php

$data = "123_String";    
$whatIWant = substr($data, strpos($data, "_") + 1);    
echo $whatIWant;
Posted by: Guest on April-27-2020
0

php get string before character

$arr = explode("/", $string, 2);
$first = $arr[0];
Posted by: Guest on November-28-2020

Code answers related to "get from string in php before and after character"

Browse Popular Code Answers by Language