Return Statements | PHP | Tutorial 19

Поделиться
HTML-код
  • Опубликовано: 17 ноя 2024

Комментарии • 7

  • @kadoacademy551
    @kadoacademy551 2 года назад +1

    Thank you Mike for these good tutorials, You're the best teacher i never see on RUclips,
    You help me a lot Mike may God bless you 🙏

  • @ranjanadissanayaka5390
    @ranjanadissanayaka5390 23 дня назад

    Thanks so much for these videos Mike. I hope you are doing okay.

  • @matiassolomon7198
    @matiassolomon7198 3 года назад +1

    you're the best!

  • @ahgiynq
    @ahgiynq 5 лет назад +1

    Thank You!

  • @bindukmathai3458
    @bindukmathai3458 4 года назад +1

    thanks

  • @ranurai6452
    @ranurai6452 3 года назад

    but what does a return 0 or return 1 do???

  • @efrainlemus3047
    @efrainlemus3047 3 года назад

    Thanks for the video! Do you know how to return a long piece of code with if statements like this,
    echo '';
    if(have_rows('modules')): while(have_rows('modules')): the_row();
    $videoOptions = get_sub_field('video_options');
    $title = get_sub_field('title');
    $video = get_sub_field('video');
    $oembed = get_sub_field('oembed');
    echo '';
    echo '' . $title . '';
    if($videoOptions == "Video"){
    echo '';
    } elseif($videoOptions == "oEmbed"){
    echo $oembed;
    }
    echo '';
    endwhile; endif;
    echo '';
    I did echo because that's what I know but it's not displaying properly. Only return works well, and I know that because I did return 'hello world', and it did what I wanted. The longer code above displays, but in the wrong place and I don't know why.
    I know it's a loaded question and that you're busy but any help will be greatly appreciated!