String : ID#6 Item name
I want to remove any ID#1
or ID#18
& keep the word after.
$string = str_replace('ID#', '', $string);
$string = substr(strstr("$string"," "), 1);
Is there a more elegant solution?
This might look a bit weird, but its a one liner
$test = "ID#6123234235345asdasdasdasd";
var_dump(ltrim($test, "ID#0..9")); // string(12) "asdasdasdasd"
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments