-2

I'm following a PHP tutorial, but I've come across a chracter and I have no idea what it is.

Here's a picture of it http://prntscr.com/7wktf6

Please tell me what it is and how to get it

JugglingBob
  • 265
  • 2
  • 6
  • 19

1 Answers1

1

That is the "&" symbol, a.k.a. "and" or ampersand

In the picture you took, two ampersands (&) next to each other in a logic statement means "and". Example,

(0 == 1 && 2 == 2) and (0 == 1 && 2 == 3)

evaluiate to false because one or more of the statments on either side of the "&&" is false. While,

(0 == 0 && 1 == 1)

evaluates to true because they are both true.

Here is more information on the matter.

Olivier Poulin
  • 1,778
  • 8
  • 15