I want to evaluate the url and what it contains to do different actions (all the urls written are redirected to the index)
but eh arrived at a problem with variables ie
a normal URL would be for example
http://localhost/myapp/productos
and one with Variable could be
http://localhost/myapp/productos/find/2
Sent the url to then respond with a json
The code I have so far
$var = $_GET['url'];
switch ($var) {
case "productos":
echo "i es igual a 0";
break;
//Aqui esta el problema no se como decirle a php que omita el numero que escriba el usuario
case "productos/find/":
echo "i es igual a 1";
break;
case 2:
echo "i es igual a 2";
break;
}