I'm trying to add the target attribute to the following function, but with the tips go wrong, how can I do? This and education source
ch ($links as $link) {
$output .= "<li><a href='http://localhost/player/index.php?var=" . $link['link'] . "'>" . $link['name'] . "</a><br/></li>\n " ;
I would need to add the target after the link, but with continuous quotes in receiving error
ch ($links as $link) {
$output .= "<li><a href='http://localhost/player/index.php?var=" . $link['link'] . "'>target="principale"" . $link['name'] . "</a><br/></li>\n " ;
答案 0 :(得分:0)
$output .= "<li><a href='http://localhost/player/index.php?var=" . $link['link'] . "' target='principale'>" . $link['name'] . "</a><br/></li>\n "
1) use single quotes to avoid your quoting issue
2) make sure the target attribute is inside the tag