There are 3 links, one line, let's call it conditionally "array" -
http://www.russianfood.com/recipes/recipe.php?rid=120590|http://www.gastronom.ru/recipe/14679/makarony-po-flotski|http://webspoon.ru/receipt/makarony-po-flotski
separated by such a symbol - |
Dear gurus, tell me a regular file to get real links from this “array”, just like this:
www.russianfood.com www.gastronom.ru webspoon.ru
but, just so that he would display as many end links as there are in the "array".
Sorry, while I myself only understand regular expressions, I learned only this:
echo str_replace('|', '<br>', $composition);
Please tell me an example in my sabzh, I will be extremely grateful. Thank!
explode()
- weexplode()
into an array of links, 2)parse_url
- we get the host name for each element of the array - BOPOH