Heredoc for html in php -
the heredoc isn't working following code
$html = <<<html <video width="$width" height="$height" controls preload autoplay > <source src="$video_url_direct" type="video/mp4" /> <object id="flowplayer" width="$width" height="$height" data="$player_url" type="application/x-shockwave-flash"> <param name="allowfullscreen" value="true" /> <param name="wmode" value="transparent" /> <param name="flashvars" value='config={"clip":"$video_url", "plugins": {"controls": {"autohide" : false} }}' /> </object></video> html;
also can use heredoc flashvars
value (i.e heredoc inside heredoc).
you have space after <<<html
:
$html = <<<html here---^
this causing syntax error. token has followed newline.
Comments
Post a Comment