开发者

PHP code in embed tag

I'm using embed tag in PHP like this:

echo "<embed src='images/meccaAdhan.mp3' name='guitar' id='BGS_ID'  autostart='true' loop='false' width='2' height='0'></embed>";
开发者_如何转开发

I need to add this code before images:

templates/<?php echo $this->template ?>

Please guide me how to solved it.


Use string concatenation:

echo "<embed src='templates/" . $this->template . "/images/meccaAdhan.mp3' ... >";


See PHP: Strings for the different string manipulations available.

echo "<embed src=\"templates/{$this->template} ...

or

?><ebmed src="templates/<? echo $this->template ?> ...

as examples.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜