Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/280.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
PHP回显if结果_Php_If Statement_Input_Call_Echo - Fatal编程技术网

PHP回显if结果

PHP回显if结果,php,if-statement,input,call,echo,Php,If Statement,Input,Call,Echo,我要回音 <input type="button" name="answer" value="loopedSlider" onclick="showDiv()"> 我该怎么做?实例 if(get_post_meta($post->ID, "youtube", true)); echo <input type="button" name="answer" value="loopedSlider"> if(get_post_meta($post->ID,“you

我要回音

<input type="button" name="answer" value="loopedSlider" onclick="showDiv()">
我该怎么做?实例

if(get_post_meta($post->ID, "youtube", true)); 
echo  <input type="button" name="answer" value="loopedSlider">
if(get_post_meta($post->ID,“youtube”,true));
回音
像这样的,你能帮我吗?

if(get_post_meta($post->ID,“youtube”,true)){
if(get_post_meta($post->ID, "youtube", true)){ 
    echo  '<input type="button" name="answer" value="loopedSlider" onclick="showDiv()">';
}else{
    // something else
}
回声'; }否则{ //别的 }
如果您想显示基于条件的输入,我认为这应该可以

   if(get_post_meta($post->ID, "youtube", true)):
      echo  '<input type="button" name="answer" value="loopedSlider"  onclick="showDiv()">';
  endif;
if(get_post_meta($post->ID,“youtube”,true)):
回声';
endif;

您使用的是什么技术?wordpress?谢谢:)成功了,我还有一个问题,我怎么能在wordpress文本编辑器中回音?我不知道,从来没有用过wordpress。首先自己尝试一下,如果你有问题,可以发布一个新问题。谢谢:)它成功了,我还有一个问题,我怎么能在wordpress文本编辑器中回音?对不起,我不使用wordpress。但我认为你可以编写并执行它。我真的不用它。但是看看这篇文章,它可能会有所帮助。
   if(get_post_meta($post->ID, "youtube", true)):
      echo  '<input type="button" name="answer" value="loopedSlider"  onclick="showDiv()">';
  endif;