I have this code. I want it to be clickable leading to another site in a new tab. Also when hover change color.
echo $query['name'];I have this code. I want it to be clickable leading to another site in a new tab. Also when hover change color.
echo $query['name']; 
    
     
    
    You can make it as a link give it id and change css
echo "<a href='another_page_url' id='checking'>".$query['name']."</a>";
On style sheet
 #checking:hover{
    color:yellow;
}
 
    
    You can do the following
echo "<a href='url' id='myLink' target='_blank'>".$query['name']."</a>";
This will open your url in a new tab.
And you can have the following styles to make it behave as a clickable text which changes its color to red on hover
#myLink {
    text-decoration: none; //remove this if you want a link
    color: black;  //remove this line if you want a blue link
    cursor: pointer;
}
 #myLink:hover{
    color:red;
}
Let me know if you require any further help
