What Does -> mean in PHP | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What Does -> mean in PHP

I am trying to create a login form and I keep running into this code... $result = $connection->query($sql); if ($result->num_rows > 0) { while($row = $result->fetch_assoc()) { $_SESSION['username'] = $row["username"]; echo "wrong password"; } echo $_SESSION['username']; } else { header("Location: home.html"); } I have no idea what it means so can someone break it down for me

15th Apr 2018, 10:00 PM
Someone Else
Someone Else - avatar
1 Answer
+ 2
That symbol means you're calling a function inside of an object. For example, in the line "$connection->query($sql)" you're calling the function query from the object $connection.
3rd May 2018, 1:16 AM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar