My string is like this 1/2/3/33/34
.
Now i want to get 3/33/34
only this part,
I am getting so many string in all string 1/2/
this is common n i want to get string after 1/2/
this string
$aa="1/2/3/33/34";
$aa=str_replace("1/2/","",$aa);
$newstring = str_replace("1/2/", "", "1/2/3/33/34");
<?php
echo str_replace("1/2/","","1/2/3/33/34");
?>
$a='1/2/3/33/34';
( ($pos=strpos($a,'/3'))!==false || ($pos=strlen($a)) ) && ($str=substr($a,$pos));
/* now result in $str */
echo $str;
// output: "/3/33/34" // or empty string "" if no '/3' found
<?php
echo substr("1/2/3/33/,4);
?>
<?php
echo str_replace("1/2/", "", "1/2/3/33/44"); // outputs Hello Dolly!
?>