Hi, I am stuck in the middle of a string comparison. I want to compare two strings to check the validity of an order. (C.q. Users must choose the same processors when they order a dual processor server).
PHP says that:
IntelĀ® P III 1000 MHz (256 KB, 133 MHz)
isn't the same as
IntelĀ® P III 1000 MHz (256 KB, 133 MHz)
No matter if I use == or === as comparison. What could be the problem, they have the same datatype, both are selected from a (different) table in a database.
I can not directly compare the values of the database, because both have a different name (extra proc will cost more) in the database. Each processor is stored in the database with the price included in its description. The name of the processor is extracted with explode() and stored in a variable $processor and $processor2. With echo "$processor<br>$processor2"; you will see the exact same value as described above, but PHP keeps saying they are not equal. Probably your knowledge extends mine, so I hope for reactions. Matt