I'm trying to get the last number after the last dash that is the last rallite -
of a string like this
Profesores-de-Barahona-demandan-calidad-del-almuerzo-escolar-y-mejorar-plantas-fsicas-3
This string comes from a URL which the last number is the id of the post so I need to extract that id to then make a query to the database try with explode
in this way but it returns me from the first dash -
$id=explode("-",$_GET["view"]);
this returns me de
Any ideas on how to extract that last number? thanks in advance