built in - Is there a PHP function for retrieving the "first part" of a URL? -
is there php function retrieving "first part" of url, similar how dirname
/basename
act on file paths?
something along lines of
echo "url_basename('example.com/this_post/12312')"
which return
example.com
parse_url should reliably.
Comments
Post a Comment