PHP - Removing part of string if certain word exist
<p>I need to remove the page number on this URL string if page number exist:</p>

<p><em>/book-list/fisica/page-9</em></p>

<p>Result should be:</p>

<p><em>/book-list/fisica</em></p>

<p>Thank you for any help.</p>