Правильно вставить php код

kimka999

Постоялец
Регистрация
21 Мар 2013
Сообщения
41
Реакции
24
Всем привет. помогите вставить правильно php код.
В код1 нужно применить php код2
<div class="song_prog_mobi">
<div class="progress_container">
<input type="range" class="amplitude-song-slider" amplitude-main-song-slider="true"/>
<progress id="song-played-progress" class="audio-progress audio-progress--played amplitude-song-played-progress" amplitude-main-song-played-progress="true"></progress>
<progress id="song-buffered-progress" class="audio-progress audio-progress--buffered amplitude-buffered-progress" value="0"></progress>
</div>
</div>
<?php if ($radio->user->is_pro == 0 && $radio->config->go_pro == 'on') { ?>
<?php } ?>
Пробовал вставить сам, пропадает ползунок для прокрутки)
 
Так?
PHP:
<div class="song_prog_mobi">
<div class="progress_container">
<input type="range" class="amplitude-song-slider" amplitude-main-song-slider="true"/>
<progress id="song-played-progress" class="audio-progress audio-progress--played amplitude-song-played-progress" <?php if ($radio->user->is_pro == 0 && $radio->config->go_pro == 'on') { ?>amplitude-main-song-played-progress="true"
<?php } ?>></progress>
<progress id="song-buffered-progress" class="audio-progress audio-progress--buffered amplitude-buffered-progress" value="0"></progress>
</div>
</div>

или так?
PHP:
<div class="song_prog_mobi">
<div class="progress_container">
<input type="range" class="amplitude-song-slider" amplitude-main-song-slider="true"/>
<?php if ($radio->user->is_pro == 0 && $radio->config->go_pro == 'on') { ?>
<progress id="song-played-progress" class="audio-progress audio-progress--played amplitude-song-played-progress" amplitude-main-song-played-progress="true">
<?php }else{ ?>
<progress id="song-played-progress" class="audio-progress audio-progress--played amplitude-song-played-progress" amplitude-main-song-played-progress="false">
<?php } ?></progress>
<progress id="song-buffered-progress" class="audio-progress audio-progress--buffered amplitude-buffered-progress" value="0"></progress>
</div>
</div>
 
также можете попробовать следующий:

<div class="song_prog_mobi">
<div class="progress_container">
<input type="range" class="amplitude-song-slider" amplitude-main-song-slider="true"/>
<progress id="song-played-progress" class="audio-progress audio-progress--played amplitude-song-played-progress" amplitude-main-song-played-progress="<?php print($radio->user->is_pro == 0 && $radio->config->go_pro == 'on' ? : 'true" : 'false');?>">
</progress>
<progress id="song-buffered-progress" class="audio-progress audio-progress--buffered amplitude-buffered-progress" value="0"></progress>
</div>
</div>
 
так же можно немного сократить - <?php заменить на <? - зависит от настройки севера/хостинга
 
Назад
Сверху