View Single Post
  #2 (permalink)  
Old September 7th, 2004, 08:31 AM
jason.gerner jason.gerner is offline
Authorized User
Join Date: Jun 2004
Location: , , .
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts

Actually, it's correct using the assignment operator. In this case, we aren't comparing statements. What happens is, each time the loop+conditional is run, $tmp is assigned the return value of the strpos function, and the if () statement evaluates that return value as well.

It's a cleaner method than evaluating/assigning a value to $tmp first, then evaluating $tmp.