How to get last charcter after underscore of a string using PHP -


this question has answer here:

i need 1 small help. need echo characters of string after _ using php. have @ example below.

$arr = "abcdef_123"; 

from above example need 123 should stored in variable.

please me.

try code :

$arr="abcdef_123"; echo end(explode("_",$arr)); 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -