Jump to content

Recommended Posts

Posted

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

Posted

You can test multiple conditions in PHP if a if instruction as shown below

if( $page->id == 1042 || $page->id == 1043 ) {
	// Do something here
}
  • Like 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...