search

Home  >  Q&A  >  body text

Is using if correct?

Here, the data is taken out and placed in $rows. If the if statement is used to judge, it can only be verified once, that is, only the first data in the $rows array can be verified. In this case, if the user name we enter is not the first piece of data, the verification will never be successful.

蓝谑蓝谑2422 days ago1383

reply all(1)I'll reply

  • NULL

    NULL2018-06-05 14:13:38

    If $rows is an array, use the array search command. If $rows is a json string, use $rows = json_decode($rows,true);

    reply
    0
  • Cancelreply