Two foreach loops, ideea for my code please
- by webmasters
Please give me an ideea for my code, its a simple links script. TY
I need two foreach loops, one which loops my sites and one which loops my anchors. So i'll have
<li>link to site1 and anchor to site1</li>
<li>link to site2 and anchor to site2</li>
<li>link to site3 and anchor to site3</li>
$currentsite = ''.bloginfo('wpurl').'';
$mysites = array('http://site1.com', 'http://site2.com', 'http://site3.com');
$myanchors = array('anchor1','anchor2','anchor3');
foreach($mysites as $mysite) ****** i need a foreach loop for the anchors array *******
{
if ( $mysite !== $currentsite ){echo '<li><a href="'.$mysite.'" title="'.$myanchor.'">'.$myanchor.'</a></li>';}
}