php - Links to pages except current domain -


as title says have array domains of site different countries. want loop array , echo browser don't want include current domain list.

example: domains = ['test1.com', 'test2.pl','test3.it','test4.uk','test5.de']

i want foreach loop print above domains except 1 user visits, if visit test1.com page, other pages should listed. i'm using php framework it's irrelevant.

this current code:

@foreach(sites $site) <a class="" href="http://{{ $site }}">{{ $site }}</a> @endforeach 

try feeding $site through parse_url. can extract hostname , match against requested hostname (via $_server variable)


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -