tags:

views:

51

answers:

2

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.

+1  A: 

Use string concatenation:

echo "<embed src='templates/" . $this->template . "/images/meccaAdhan.mp3' ... >";
Felix Kling
thank you Felix King for you help
leonyx
+1  A: 

See PHP: Strings for the different string manipulations available.

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

or

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

as examples.

tylermac