开发者

PHP IF, ELSE SHOW HELP?

Coming across a massive pain, is they a way I can for example say if has youtubeurl else show vimeourl? Here is my coding

<?php $youtube_vimeo_player = get_post_meta($post->ID,'_youtube_vimeo_player',TRUE); ?>
<?php $info = $video->info("'".$youtube_vimeo_player['youtubeurl']."'"开发者_开发问答); ?>
<div class="content">
    <div>
    <a href="<?php echo get_permalink(); ?>" title="<?php echo $info['title']; ?>">
            <img src="<?php echo $info['thumb_large']; ?><?php echo wp_get_attachment_url( $attachment->ID , false ); ?>" alt="<?php echo $info['title']; ?><?php echo $info['title']; ?>"  class="thumb"/>
    </a>
    </div>
</div>

<?php $info = $video->info("'".$youtube_vimeo_player['vimeourl']."'"); ?>
<div class="content">
    <div>
    <a href="<?php echo get_permalink(); ?>" title="<?php echo $info['title']; ?>">
        <img src="<?php echo $info['thumb_large']; ?><?php echo wp_get_attachment_url( $attachment->ID , false ); ?>" alt="<?php echo $info['title']; ?><?php echo $info['title']; ?>"  class="thumb"/>
    </a>
    </div>
</div>

Any help would be more then great : )


Did you try

if ($youtube_video_url) {
    //YouTube Stuff
}
else {
    //Veoh stuff
}

??


If your asking how do an if statement inline style then this is how.

<? if (something == true) { ?>
<div>something</div>
<? } else { ?>
<div>something else</div>
<? } ?>
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜