search

Home  >  Q&A  >  body text

Teacher, if $apple = true. What comes out will be "The false interval is done, you miss Sister Feng." You said it wrong.

<?php

$apple = true;

teue=empty($apple);

if(empty(true)){

echo 'The true interval has been executed, Sister Feng, I love you';

}else{

echo 'The false interval has been executed, you miss Sister Feng';

}

?>

The answer is else , not what you said if . I hope the teacher can correct his mistake. I'm worried that many people will mistakenly think that your slip of the tongue is correct after watching the video


将2108 days ago1336

reply all(3)I'll reply

  • 马先生

    马先生2019-02-20 22:29:57

    <?php

    $apple = true;

    teue=empty($apple); //This line must report an error because what is teue? Is it a variable? If it is a variable, please add the $ sign,

    //empty (true) Did the teacher really write this? ? ?

    if(empty(true)){

    echo 'The true interval was executed, Sister Feng, I love you';

    }else{

    echo 'Okay, leave the section, you miss Sister Feng';

    }

    ?>


    reply
    0
  • 将

    I typed the English incorrectly. If it is true, please watch the video again. Whether the final execution is if or else

    · 2019-02-23 00:27:01
  • Cancelreply