Wrote a condition with inequality, but it gives out with an error.

if (1 < 100 > 99) { //1 меньше 100, но больше 99 $x = substr($koluser[0], 0, 2); } elseif (1 > 10 < 99) { //1 больше 10, но меньше 99 $x = substr($koluser[0], 0, 1); } elseif (1 < 10) { //1 меньше 10 $x = '1'; } 

Maybe I wrote it down incorrectly, but it is necessary that there be such a meaning (written in //).

  • I wonder where you found this php syntax? if (1 <100> 99) - Ale_x
  • Thanks It works. - cnofss

1 answer 1

In php, you can not write like that. If necessary, write so:

 (1 < 100) && (100 > 99) 
  • Need to Learn Discrete Mathematics to Author - darkwoolf