Ver Mensaje Individual
  #5 (permalink)  
Antiguo 14/10/2009, 16:52
suntus
 
Fecha de Ingreso: noviembre-2002
Mensajes: 746
Antigüedad: 21 años, 5 meses
Puntos: 6
Respuesta: limpiar string

ya se que a veces pregunto cosas raras, pero bueno, si algun raro se encuentra con esto, que sepa que lo que hice fue

if (substr($url, -3, 2)=='_p'){$url=substr($url, 0, -3);}else{
if (substr($url, -4, 2)=='_p'){$url=substr($url, 0, -4);}else{
if (substr($url, -5, 2)=='_p'){$url=substr($url, 0, -5);}}}

seguramente habra algo mas OPTIMO, pero yo a tanto no llego..