我有以下代码:
case "links":
$SideContent ='<a href="http://www.EXAMPLE.net" target="_blank">Example Link</a>';
break;
如何用从我的列表中提取的品牌替换写着"EXAMPLE"的链接区域?我已经在页面上回显了它,但不确定如何在现有的php代码中使用回显:
<?php echo $brand_to_use; ?>
IE我的目标如下:
<a href="http://www.$brand_to_use.net"
如果我正确理解你的问题,
$SideContent ='<a href="'.$brand_to_use.'" target="_blank">'.$brand_to_use.'</a>';
case "links":
$SideContent ='<a href="http://www.'.$brand_to_use.'.net" target="_blank">Example Link</a>';
break;