I've got an array called namely
externalArray
externalArrayIgnored
and
rowname
In externalArray
is a bunch of links stored. In rowname
the links stored have the same Domain with externalArray
. The ones stored in rowname
got marked up in the Webinterface
with a glyphicon
. If you click this, the entry in externalArrayIgnored
will be store in the database.
So if I got a link which is in rowname
and not in externalArrayIgnored
it should execute this:
echo "<span class='external_glyphicon glyphicon glyphicon-ok-sign' style='color: #5cb85c;' data-id='$row->id' data-rowname='$row->name' data-url='$link' data-key='1'></span>";
If it is in rowname
and in externalArrayIgnored
nothing should happen.
That is my code right now,but it is not working:
<?php foreach ($externalArray as $key => $link): ?>
<a href="<?php echo $link; ?>" target="_blank"><?php echo $link; ?> </a>
<?php endforeach;?>
<?php
foreach ($rowname as $markedUrl){
if($markedUrl == cut_url($link) && in_array($link, $externalArrayIgnored)){
echo "<span class='external_glyphicon glyphicon glyphicon-ok-sign' style='color: #5cb85c;' data-id='$row->id' data-rowname='$row->name' data-url='$link' data-key='1'></span>";
}
}
?>
How can I loop this right ? Thanks for any help.