kaz Posted December 22, 2023 Posted December 22, 2023 I have need some scripts only in two pages. In one page I use an if query with the ID if ($page->id == 1042 ): Is a query able to use multiple IDs? 1042 | 1043 and 1042 && 1043 will not work
Nicolas Posted December 22, 2023 Posted December 22, 2023 You can test multiple conditions in PHP if a if instruction as shown below if( $page->id == 1042 || $page->id == 1043 ) { // Do something here } 1
bernhard Posted December 22, 2023 Posted December 22, 2023 This would also work: <?php if($page->matches("id=1042|1043")) ... ? 4
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now