jeudi 31 mai 2018

Multiple conditionals in php

if
(
  ($page_num >=10 && $page_num<= 20)  || 
  ($page_num >= 21 && $page_num =< 30) || 
  ($page_num >=31 && $page_num =<40)
){
     if($i==1){
       $i = $page_num;
     }
 }

I am trying to achieve multiple conditionals using the above in PHP. I tried it and it kept outputting an error, so I don't know if I am making a mistake or what I am trying above is not possible in PHP or programming.

The error message

Parse error: syntax error, unexpected '<' in C:addsdcredit.php on line 398

Aucun commentaire:

Enregistrer un commentaire