I am mainly a c# programmer and I am currently trying to convert some php code with no php knowledge. I have successfully converted what I needed except for this one if statement.
It doesn’t seem similar to any if statement that I have used in java,c++ or c# and my googling has been fruitless.
What is this actually doing?
if ($var1["string1"][$var2]["string2"] - $var3["string2"])
Here
$var1["string1"][$var2]["string2"]is a three dimensional associative array like
var1[0][1][2]in Java, but here the indexes are Strings instead of integers as is the case with associative arrays.And
$var2(value of$var2must come from somewhere else) is used as an index for the second dimension of the array, like"string1"is used as index for first dimension.Rest is simple, you are subtracting two elements, if result is 0 then it will be false else it will be true.