0

I need to concat a variable to a link tag. But I fail. Any tips or ideas?

$styleLocation = mix('css/app.css');

$style = '<link rel="stylesheet" href=$styleLocation>';

Currently it returns:

"<link rel="stylesheet" href=echo $styleLocation>"

iasnion123
  • 13
  • 4

1 Answers1

0

Just write the string like this:

$style = "<link rel='stylesheet' href=$styleLocation>";

You can write variable names inside double quotes

Gogu Gogugogu
  • 162
  • 1
  • 6