php - Remove from a URL -
so have next url:
http://www.domain.com/folder1/folder2/file.php
is there way me grab http://www.domain.com/folder1/
part?
i suggest this:
<?php $url = 'http://www.example.com/path1/path2?googleguy=googley'; $array = parse_url($url) var_dump($array); var_dump( explode('/',$array["path"])); ?>
php
No comments:
Post a Comment