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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:34:22+00:00 2026-06-11T16:34:22+00:00

i am using a for loop and it returns 3 ids . but how

  • 0

i am using a for loop and it returns 3 ids . but how to get those three ids separate instead of getting it inside a for loop. my code is

        <? $meta = get_post_custom_keys();
            $prev = '';
            foreach ($meta as $key) {
                $parts = explode (':', $key);
                if (count ($parts) == 1 || $parts[0] != 'download')
                    continue;
                $value = get_post_meta (get_the_ID(), $key, true);
                echo "<a href='$value'>{$parts[1]}</a>";

            }
        ?>

now in the above echo "<a href='$value'>{$parts[1]}</a>"; gets 3 diffrent values of $values everytime it runs but how to get those ids separate such as value 1 , value 2 and value 3 ?

  • 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-11T16:34:23+00:00Added an answer on June 11, 2026 at 4:34 pm

    you can store the $value in an array as $value[] = get_post_meta (get_the_ID(), $key, true);

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

Sidebar

Related Questions

The code I'm using searches for a string inside two other strings (tags). The
So I create multiple BackgroundWorkers using loop: foreach (var item in list) { worker
Using for loop in PHP can we have numbers associate with a variable name?
I'm using a loop as below to render a label and editor for each
I just designed a simple For Loop using window form application. I would like
How can I skip over a loop using pdb.set_trace() ? For example, pdb.set_trace() for
I need to write this program using a loop https://i.stack.imgur.com/gko6T.jpg this is what i
I am running a windows service and using a loop and Thread.Sleep to repeat
How do I simplify this templated vector initializer loop using lambdas or some kind
Take the following naive implementation of a nested async loop using the ThreadPool: ThreadPool.SetMaxThreads(10,

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.