Target from a repeat region link

A

Anonymous

Guest
Code:
<a href="<?php echo $row_eduNav['Links']; ?>"><?php echo $row_eduNav['Name'];?>
		  </a>


I have the above repeat region and I want to single out a Category.Name called Games to open in it own window???

I thought

Code:
<?php if ($row_eduNav['Links'] = ['Games']) target ='_blank"?>

:help:
 
Code:
<?php if ($row_eduNav['Links'] = ['Games']) target ='_blank"?>

Code:
<?php
if ($row_eduNav['Links'] == 'Games') {
    echo "target ='_blank'";
}
?>
 
Nah ruturajv that didn't work.....

I might be placing the if statemtne in the wrong spot also!!!

:shock:


More Help please and Thanks for your effort....

d
 
Sorry but I'm a newbie!!!

Where do I put the if statement in the following??

<a href="<?php echo $row_eduNav['Links']; ?>"><?php echo $row_eduNav['Name'];?>
</a>
 
Oh i see what you´re trying to do!
You have the url for the link in $row_eduNav['Links'] and the name for link in $row_eduNav['Name'].
So if the 'Name' is 'Games' it will open its url in a new window...right!?

Try this out:
Code:
<?php 
echo '<a href="' . $row_eduNav['Links'];

if ($row_eduNav['Name'] == 'Games') { 
    echo '" target ="_blank">' . $row_eduNav['Name'] . '</a>'; 
}
else{
    echo '">' . $row_eduNav['Name'] . '</a>'; 
}
?>
 
Back
Top