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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:56:11+00:00 2026-05-23T11:56:11+00:00

All right so I have a problem and I’m looking for the best way

  • 0

All right so I have a problem and I’m looking for the best way to model it.

At the moment I have an array called $lang and it is defined in multiple files. It is initialized as so in each file: $lang = array_merge($lang, array( "Key" => "Value", )); so that when multiple files are included on a page, the $lang array contains all keys and values from their respective files into one big array.

Now I want to build a front-end where it displays all of the attributes from the array, a user can change the attributes, and save them. At the moment I am including them as so:

foreach(glob("language/*.php") as $filename){
   include $filename;
}

I display them all fine, but when I want to re-submit them as a form, I don’t know how to specify which Key => Value belonged to which file, as they were all merged when they were included.

Is there some clever way I can differentiate which file a certain Key => Value belonged to as I have set it up right now, or should I step back and set up the model differently?

  • 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-23T11:56:11+00:00Added an answer on May 23, 2026 at 11:56 am

    sounds like you need to store the filename in each array using a multidimensional array, eg

    array("filename"=>array("Key" => "Value")
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All right. The problem here is pretty abstract. Bear with me. I have a
Right now we have AD/Exchange to manage all of our users logins/e-mail on-site at
Right now, I have all the employees of my company login to an external
The WebBrowser control has a property called IsWebBrowserContextMenuEnabled that disables all ability to right-click
I have problem with Autocomplete, it works well in all browsers except for IE.
I have a problem finding the right wildcard pattern to extract parts of my
I have a problem that I don't understand at all: i = 150 If
All right all, So I've got a UITableView that is inited in applicationDidFinishLaunching like
I'm using the OnIdle-event for some simple animations, and it works all right. The
you all know: right click -> zoom in or out in flash file, well,

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.