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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:41:27+00:00 2026-05-26T06:41:27+00:00

I have a question. I’m using a script that will check the domain in

  • 0

I have a question. I’m using a script that will check the domain in my database. If got a match then it will be TRUE.

while( $row = mysql_fetch_array($result) ) {       
    echo var_dump($phpgsb->doLookup($row['origin'])). " - ". $row['origin'];
    echo "<br>";
}

$row['origin'] is an array of domain. Example:

test.com
lol.com
what.com
blabla.com

And the output I’m getting is:

bool(false) - test.com.
bool(false) - lol.com.
bool(true) - what.com.
bool(false) - blabla. 

what.com is in my database so it’s a TRUE. Now the problem is I don’t know how to use/capitalize/exploit (I’m sorry my English is not good) the true result. Is there anyway I could create in the while loop:

if (bool == true) {
    only echo the true result
}

I have did this with associative arrays results. I don’t know how to do it boolean.

  • 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-26T06:41:28+00:00Added an answer on May 26, 2026 at 6:41 am

    If you’re trying to find the record that $phpgsb->doLookup($row['origin']) returns true when passing in the current row of your db query, do:

    while ($row = mysql_fetch_array($result)) {
        if ($phpgsb->doLookup($row['origin']) === true) {
            echo var_dump($phpgsb->doLookup($row['origin'])). " - " . $row['origin'];
            echo "<br>";
        }
    }
    

    Note the ===, which checks type AND value. == is a falsy check and therefore could return conditions that evaluate 0 == false (or 1 == true) as a true statement(s).

    http://php.net/manual/en/language.operators.comparison.php

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

Sidebar

Related Questions

I have question about database optimizing, indexing. I have table that called projects and
i have question on this topic i think that answer is incorrect look Swap
I have question regarding shared memory segmentation in c using POSIX system calls. Is
I have question I'm developing small application to desktop in win Forms. I'm using
I have question will the click event or any other event run in document.ready()
I have question about throw. How will the throw work in the following code?
I have question here, i design multiview application using view base template. Page 1
I have question that if I have date as string in one column of
I have question regarding about finding subview using '.tags' in one UIView. for (UIView
I have just started using maven and have question. My pom.xml contains tag developer

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.