<?php $string = 'http://localhost/new-123-rugby/competiti/on.php?croncode=12345678'; echo(preg_replace('#/[^/]*$#', '/', $string));
You have javascript disabled. You will not be able to edit any code.