Daca la cat+subcat iti pune 2 slashuri (presupun ceva de genul cat//subcat/) inseamna ca ori $p[2] ori $p[4] contine deja un slash.