How do you use one php variable for the url in a hyperlink around another php variable? Below is my code, which is clearly not working. I want $url to be the hyperlinked text of $songTitle.
if ($result) {
$numberOfRows = $result->num_rows;
for($i=0; $i < $numberOfRows; $i++) {
$row = $result->fetch_assoc();
echo '<tr>';
echo '<td>' . $row['artistName'] . '</td>';
echo '<td>'<a href=". $row['url'] . > . $row['songTitle'] . </a> '</td>';
echo '<td>' . $row['yOR'] . '</td>';
echo '</tr>';
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…