I am trying to extract a sub-string. I need some help with doing it in PHP.
Here are some sample strings I am working with and the results I need:
$temp = "COM1904150001","1","ytuaioeighalk","tyueiff","assets/report/celc_coba/d02c25b2-5c07-11e9-8f1a-02fd8bf7d052/"
And the result i need is:
$temp = d02c25b2-5c07-11e9-8f1a-02fd8bf7d052
I want to get the string at my last '/'
So far, I've tried:
substr($temp, 0, strpos($temp, '/'))
But, it seems didn't work at all.
Is there a way to handle that case with PHP approach ?