Geraldm
Apr 7th 2007, 3:54 am
Hi,
I have an array of urls like so:
$urls = array('http://domain.com/text/','index.php', 'http://otherdomain.com/','../page.php');
How can I convert them to absolute urls using something like: http://domain.com/dir/ as the base URL so the output will be this:
http://domain.com/text/
http://domain.com/dir/index.php
http://otherdomain.com/
http://domain.com/page.php
I've had a look on google but cannot find any relevant information on it. Can anyone help?
Thanks,
Gerald.
I have an array of urls like so:
$urls = array('http://domain.com/text/','index.php', 'http://otherdomain.com/','../page.php');
How can I convert them to absolute urls using something like: http://domain.com/dir/ as the base URL so the output will be this:
http://domain.com/text/
http://domain.com/dir/index.php
http://otherdomain.com/
http://domain.com/page.php
I've had a look on google but cannot find any relevant information on it. Can anyone help?
Thanks,
Gerald.