Embed PHP kodu

2 Cevap php

Böyle PHP embed etiketini kullanarak ediyorum:

echo "<embed src='images/meccaAdhan.mp3' name='guitar' id='BGS_ID'  autostart='true' loop='false' width='2' height='0'></embed>";

Ben görüntülerde önce bu kodu eklemeniz gerekir:

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

Münhal nasıl Lütfen bana yol.

2 Cevap

Kullan string concatenation:

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

PHP: Strings mevcut farklı dize manipülasyonlar için bkz.

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

veya

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

örnek olarak.