It's not very useful to write like this tomorrow
清风戏月
清风戏月 2020-05-19 11:46:31
0
2
1185

Teacher, is this relational operation? What's wrong if it doesn't work? How to throw an exception? What are the purpose and advantages of writing this way?

image.png

清风戏月
清风戏月

reply all (1)
卖老冰棍的小女孩

1. Generally, variables are placed on the left, for example: $a=2,$a=ture

2. in_array returns a Boolean value and is generally used in judgment statements, such as: if(in_array($ a,$b)) like this

3, there is a difference between "=" sign and "==", "=" means assignment, "==" means comparison

Therefore, you will get an error

above.
  • reply I also thought it would report an error, but this is a screenshot of the video. In the video, the teacher wrote this and there was no error. So I'm confused. I don’t know if the video was edited.
    清风戏月 author 2020-05-20 17:54:10
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!