开发者

PHP code in embed tag

开发者 https://www.devze.com 2022-12-30 07:40 出处:网络
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'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

精彩评论

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

关注公众号