Categories
How to remove a piece of text from a variable?
I extract part of the URL into the variable: /catalog/cabinet/premium - cab everything to the last slash.
Answer the question
In order to leave comments, you need to log in
preg_replace( '/.*\//', '/', $str ); ideone.com/ueyrif
preg_replace( '/.*\//', '/', $str );
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question