php用html和css连接字符串

I have this php code where I wanted to concatenate:

return '<div class="height-shortcode" style="height:"'.$myHeight.'">'.$content.'</div>';

my resulting html should look something like this:

<div class="height-shortcode" style="height:10px">Hello World!!</div>

however I can't get rid of the extra double quotes around it:

<div class="height-shortcode" style="height:"10px">Hello World!!</div>

Thanks for any help in advance.

You added one extra double qoute

return '<div class="height-shortcode" style="height:'.$myHeight.';">'.$content.'</div>';

You are adding one extra quote in height ".Its obvious that this will print one more quote "" Your code should look like this

return '<div class="height-shortcode" style="height:'.$myHeight.'">'.$content.'</div>';

Hope this helps you