search

Home  >  Q&A  >  body text

if / else / can elseif be used?

I wrote and ran it and it said there were errors and syntax problems. Is it different from the usage in Java and C language?

阿超阿超2336 days ago1419

reply all(6)I'll reply

  • 无忌哥哥

    无忌哥哥2018-07-13 13:34:43

    if(){}elseif(){}else{}, see if there is anything wrong.

    reply
    0
  • 阿超

    It's not wrong. I copied a piece of code from the Internet and ran it, but there is still a problem.

    阿超 · 2018-07-13 15:38:03
    无忌哥哥

    So what is the specific error reported?

    无忌哥哥 · 2018-07-13 15:49:59
    You bad bad

    What does the error say?

    You bad bad · 2018-07-13 16:01:48
    阿超

    Did I forget to give conditions to elseif? Did I forget to give conditions after elseif?

    阿超 · 2018-07-13 17:09:59
    You bad bad

    This is because your { symbol is wrong. See if there is less writing. on line 24

    You bad bad · 2018-07-13 17:29:19
    阿超

    There is no error. It is indeed a syntax problem. I found the problem.

    阿超 · 2018-07-16 17:30:38
    阿超

    parse error:syntax error,unexpected '{', expecting'(' in D:\phystudy\PHPTutorial\www\array.php on line 24

    阿超 · 2018-07-13 16:56:48
    阿超

    this one

    阿超 · 2018-07-13 16:57:29
  • Cancelreply