I need an Array of the following structure:
Array
(
[www.example.com] => Array
(
[0] => http://www.example.com/
[1] => http://www.example.com/something.html
[2] => http://www.example.com/anything.html
)
[www.beispiel.com] => Array
(
[0] => http://www.beispiel.com/product-services/
[1] => http://www.beispiel.com/non-disclosure-agreement/
)
)
As input arrays I have the following two
Array ( [0] => http://www.example.com/
[1] => http://www.example.com/something.html
[2] => http://www.example.com/anything.html
[3] => http://www.beispiel.com/product-services/
[4] => http://www.beispiel.com/non-disclosure-agreement/
)
and
Array ( [0] => www.example.com [1] => www.beispiel.com )
in the moment I have something like this:
Array
(
[0] => Array
(
[www.example.com] => http://www.example.com/
)
[1] => Array
(
[www.example.com] => http://www.example.com/something.html
)
[2] => Array
(
[www.example.com] => http://www.example.com/anything.html
)
[3] => Array
(
[www.beispiel.com] => http://www.beispiel.com/product-services/
)
[4] => Array
(
[www.beispiel.com] => http://www.beispiel.com/non-disclosure-agreement/
)
)
is that possible or do I miss some information about php (for example key could not be an parsed url (host)) ?
parse_urlfunction in PHP.