Comments on Operators In PHP

Operators In PHP This article is the second of a series of PHP guides that aim at teaching you the basics of PHP programming.

5 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By:

Don't forget the (===) operator for mathing type as well as string value. I've found this operator ESSENTIAL to properly evaluating some function built into PHP.

By:

yes it is very useful operator when you want to match the data types as well as values e.g

<?php

$value1 = 3;

$value2 = "3";

if($value1 === $value2)

echo "matched";

else

echo "not matched";

?>

You will get the NOT MATCHED output because value1 has 3 as integer value on the other hand 3 is string in value2 variable. So whenever you need to match data type as well as value you should use === operator.

By:

This tutorial is great. Just to let you know, the code examples you have listed for division and modulus are using the subtraction operator. Also in the assignment section, using the forward slash does give a float, and a backslash gives an error. Otherwise, nice work and good examples.

By:

I have removed all typos. thanks for pointing them.

By: julio

Thanks for the quick tips.was looking at how to display in a table; to work like in excel.