Quantcast
Channel: Cullen Web Services » url
Viewing all articles
Browse latest Browse all 3

Using PHP’s parse_url Function

$
0
0

URLThis is a PHP function that I wish I had known about earlier, so I thought it was worth a mention for today’s Daily Web Tip.

parse_url is a function that breaks a url down into it’s parts.

<?php print_r(parse_url('http://cindycullen.com/example/test.php?id=255#faq1')) ?>

Will give you:

Array ( [scheme] => http [host] => cindycullen.com [path] => /example/test.php [query] => id=255 [fragment] => faq1 )

Pretty cool!


Viewing all articles
Browse latest Browse all 3

Trending Articles