[thelist] php (if/else)

J. Blanchard jay.blanchard at thermon.com
Wed Jun 20 10:54:51 CDT 2001


I am no php guru, but there is another way to approach this...

Test for 'not equal to' -- if ($cur_id <> $max_art_id){ -- in other words, reverse the test. I think that what is going on here is that both '31' and '1' evaluate as 'true'.
Have you tried evaluating as a number instead of an equality? if ($cur_id = $max_art_id){? This would be the proper numerical test and does not reassign the value of the variables because they are in the scope of the 'if' statement.

Hope this helps!

Jay Blanchard
Web Engineer 
Thermon Industries, Inc.
1.800.820.HEAT x327

-----
"If you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime. "-- Anonymous 
-----




___________________________________________________________________________
Visit http://www.visto.com/info, your free web-based communications center.
Visto.com. Life on the Dot.





More information about the thelist mailing list