开发者

PHP IF, ELSE SHOW HELP?

开发者 https://www.devze.com 2023-03-29 06:19 出处:网络
Coming across a massive pain, is they a way I can for example say if has youtubeurl else show vimeourl?

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

精彩评论

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