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

android - net_scheduler holding wakelock -

sql - MySQL : Getting Entries from a many-to-many table -

java - Retrieving data from database using jsp (Hibernate + Spring + Maven) -