Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7851921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:17:43+00:00 2026-06-02T19:17:43+00:00

There is a problem that my brain I can not afford to solve, namely

  • 0

There is a problem that my brain I can not afford to solve, namely the creation of if-else conditions:
960×540 is the value for which we obtain the value of “1”, all values ​​less than this (for example 800×480) get again value “1”, a similar situation 540×960 (480×800, etc. in descending order with smaller numbers), if the value of the number of 960×540 increases from one side (for example 1000×540 or 960×600), then give “2” in a variable instead of “1” … I hope I have clearly described the problem.
I was advised to multiply for example 960×540, and an overall value, make it easier to work with it. But the problem lies in the fact that I work with a screen resolution of mobile phones and is not suitable for the reason that we forget about the desktop with the low resolution, like 800×600 pixels which are the cumulative number of much less than that of the screen with a resolution of 540×960… Sorry for bad English.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:17:44+00:00Added an answer on June 2, 2026 at 7:17 pm

    I’ll try to explain your request more clear. (I did not edit your question since I’m not sure I got everything right)

    • 960×540 => 1

    Smaller values => 1

    • 800×480

    Greater values (each dimension) => 2

    • 1000×540
    • 960×600

    You have to look at both x- and y-resolutions and determine your result.
    Do not try to check for specific resolutions, because this will get a really complex condition.

    • Extract x and y (width and height).
    • Test them separately.

    Your if-statement should look like this:

    if ($x > 960 || $y > 540)
        $result = 2;
    else
        $result = 1;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicates: Is there a problem that has only a recursive solution? Can every
I have made a swings application but there is one problem in that which
is almost a week that i can't fix a brain painful problem: I have
There was this problem that has been asked about implementing a load byte into
I'm working with Eclipse and ClearCase and we're facing the problem that there's no
Problem There are data gaps that need to be filled. Would like to avoid
The problem is that it takes way to long in SQL and there must
Here's my problem: there's an internal issue tracking system that has a nice summary
I know there's a lot of posts with the same that problem. I just
Is that a problem if a solution contains many projects and there are some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.