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 1035929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:37:12+00:00 2026-05-16T14:37:12+00:00

A = if infos !empty and inputs empty – do remove; B = if

  • 0

A = if infos !empty and inputs empty
– do remove;

B = if infos empty and inputs !empty
– do add;

C = if infos !empty and inputs !equal to infos
– do add;

We can have like:

if B //it's the most common operation, so at the beginning.
{
  //add 
}
else
{
 //remove
}
elseif(c) 
{
 //the same add
} 

I believe this can be better thinking. Can I have your help?

Thanks in advance,

  • 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-05-16T14:37:13+00:00Added an answer on May 16, 2026 at 2:37 pm
    if (infos != inputs) {
        if (empty(inputs)) {
            // remove
        } else {
            // add
        }
    }
    

    Remember, the outermost condition checks that both values are never empty (never the same, actually). E.g.,

    A = if infos !empty and inputs empty – do remove;

    If inputs is empty infos can not be empty. Therefore, remove.

    B = if infos empty and inputs !empty – do add;
    C = if infos !empty and inputs !equal to infos – do add;

    Different and inputs not empty => it doesn’t mather whether info is empty => add.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I’d like to be able have equal heights of two DataGrid s based on
I'm trying to save some UserControl-Infos into a List like this: List<UserControlDetails> myList; public
Today i have a little problem containing a File Upload. First some Infos: Rubyversion:
Info: C#, Visual Studio 2010 RC How can I add a WCF Web Service
I have a form to upload image like below <form name=sample enctype=multipart/form-data action=index.php method=post
I have a simple login page and the URL structure is like www.mydomain.com/admin/auth I
In this form users can add some info for Authors (music, lyric authors) The
I am hoping someone can point me in the right direction. I have a
I have this HTML: <?php if(!empty($_GET['pID'])) $the_pID = mysql_real_escape_string($_GET['pID']); #echo $the_pID; ?> <form action=inc/q/prof.php?pID=<?php
I have a jQuery AJAX form and I'd like for it to do better

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.