Hello, tell me what is the error? I want to bring this sentence through echo? but the interpreter writes the error Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in ...

Here is the line itself

<div id='cover_container' style='background:url('cover_img/"$myrow['cover_img'];"');'> 

Ps output started via echo "" (double quotes)

  • escape double quotes with \: echo "this is \" text \ "with quotes"; - zb '

1 answer 1

Why are there quotes? Are you trying to parse this string or is it a template?

If the pattern, then:

 <div id='cover_container' style='background:url('cover_img/<?php echo $myrow['cover_img']; ?>');'> 

If nevertheless parsit something like this:

 echo "<div id='cover_container' style='background:url('cover_img/$myrow['cover_img']');'>"; 

or so:

 echo "<div id='cover_container' style='background:url('cover_img/".$myrow['cover_img']."');'>"; 

From the context of the above question, it is not quite clear what you are getting from the poor echo))