I am new in PHP and I have some text saved in a variable. I am trying retrieve a the text followed of the first '/' character. Here is what i tried.
$var="xxxxx/ttt/tttt/tttt.txt";
echo $str . "<br />";
echo trim($str,"/");
The output must be ttt/tttt/tttt.txt
.
I will highly appreciate if i can get some help. Thank you.