Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $page = $_SERVER['REQUEST_URI']; // получили путь
- if (!strpos($page, 'page')) return; // нет слова page в url
- $page = substr($path, 0, -1); // удалили последний /
- $pos = strrpos($page, '/'); // нашли позицию крайнего справа /
- $num = substr($page, $pos + 1);
Add Comment
Please, Sign In to add comment