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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:48:58+00:00 2026-05-25T02:48:58+00:00

To explain more. I have a current data-store which will feed a .json file

  • 0

To explain more. I have a current data-store which will feed a .json file from a remote server. I can grab this remote file through an id added to a curl function.

ie. $json_url = ‘example.com/datastore.json?id=’. $result[‘id’].”;

This example is housed within a foreach loop pulling the id’s from a database. This json_url example works for requesting 1 id at a time. I have instituted on the remote server the ability to request multiple ids at once through comma separated values.

ie. $json_url = 'example.com/datastore.json?id=1,id=2,id=3

Now if I am building the json_url on the fly for multiple requests, how should I do this?

I want this type of a $json_url result:

`$json_url = 'example.com/datastore.json?id=1,id=2,id=3`

BUT those id values are id values that have been returned from the foreach loop, and with each id value comes an added json file and an added id value to the json_url. In this case instead of 1, it is 3 .json files I will have retrieved with 1 request to the server, the number here is ambiguous as it is ultimately dependent on how many id values are found on the query.

If I am unclear with my examples, let me know and I will take the time to make it more clear.

                `
  • 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-25T02:48:59+00:00Added an answer on May 25, 2026 at 2:48 am

    Why not using an array?:

    $json_url = 'example.com/datastore.json?id[]=1&id[]=2&id[]=3
    

    then you can loop using

    foreach($_GET['id'] as $key => $val){}
    
    //$_GET['id'] OR $_POST['id']...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an application which stores its data in SQL Server. Each table has
I will try to explain the situation as it is a little bit more
Let me try to explain what I need. I have a server that is
Let me explain a bit more, I am trying to have a large area
Explain why a nullable int can't be assigned the value of null e.g int?
Please explain from Linux, Windows perspectives? I am programming in C#, would these two
Sample HTML Data <body style=width:300px;> <h3>Long-Text</h3> A simple tool to store and display texts
I have recently decided to switch all my current plain mysql queries performed with
I have asked aqbout timezones and date/time before but this is a more specific
Can you elaborate on the current state of blocks (in the Ruby sense) in

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.