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

  • Home
  • SEARCH
  • 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 1013087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T10:02:44+00:00 2026-05-16T10:02:44+00:00

How can I check if each value in the variable $c = 90,89,78,88; equal

  • 0

How can I check if each value in the variable $c = 90,89,78,88; equal true I think you call it an array in my script one at a time?

This part checks the variable.

if($cat['id'] == $c){
    $url = $parent_url . $cat['url'];
    echo '<a href="' . $url . '" title="' . $cat['category'] . '">' . $cat['category'] . '</a>';            
}

Here is the PHP code.

$c = 90,89,78,88;

function make_list ($parent = 0, $parent_url = '') {
    global $link;
    global $c;

    foreach ($parent as $id => $cat) {

        if($cat['id'] == $c){
            $url = $parent_url . $cat['url'];
            echo '<a href="' . $url . '" title="' . $cat['category'] . '">' . $cat['category'] . '</a>';            
        }

        $url = $parent_url . $cat['url'];

        if (isset($link[$id])) {
            make_list($link[$id], $url); // $url adds url value to sub categories
        }               
    }       
}
  • 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-16T10:02:44+00:00Added an answer on May 16, 2026 at 10:02 am
    global $c; 
    
    $cArray = explode(',',$c);
    
    foreach ($parent as $id => $cat) { 
    
        if (in_array($cat['id'],$cArray)) {
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 540k
  • Answers 540k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I suspect the error has nothing to do with LOBs,… May 17, 2026 at 2:43 am
  • Editorial Team
    Editorial Team added an answer I think you need to change the firstday variable value… May 17, 2026 at 2:43 am
  • Editorial Team
    Editorial Team added an answer From the docs: all system-generated hidden fields are rendered at… May 17, 2026 at 2:43 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

So I've an array-variable of servers that is dynamically created from an external script.
How can I check check-boxes (on page load) according to value of check-boxes using
I have the following code, repeated on each Form , as part of the
I have a csv file where amount and quantity fields are present in each
I have a csv file where amount and quantity fields are present in each
Is it possible to retrieve the value of the base url from inside a
I am trying to check checkboxes based on a select option. So, if the
I'm trying to query a particular registry folder (or whatever you want to call
I have a coding/maths problem that I need help translating into C#. It's a
I've been working on a simple forum for my site. I'm adding a feature

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.