Array picking up key instead of item

I would appreciate any help:

edit column:

// LOCATION

"shoot_location" =>array(
"req_type"=>"rt",
"header"=>"Location", 
"unique"=>false,
"type"=>"enum", 
"width"=>"300px",
"operator"=>true,
"default"=>"" ),


foreign key:

// SHOOT LOCATION

"shoot_location"=>array(
"table"=>"valueTableDetails", 
"field_key"=>"table_id", 
"field_name"=>"item", 
"view_type"=>"dropdownlist", 
"condition"=>"table_id=4", 
"order_by_field"=>"", 
"order_type"=>"ASC", 
"on_js_event"=>""),

The result is a location field with “4” …

Two questions… As I’m having a brainf**t, I need to know what I’m doing wrong…

Second, is there a better way to have lookup tables that is more flexible to growth. Right now, I can add items to existing tables, (with the caveat that my results are screwy), but the user cannot add new tables without my intervention.

All help will be tolerated, moaned about, and implemented.

Thanks!!!

What is this code you’ve shared? It looks like part of an interior array of a multidimensional array… what is this array? What is the meaning of its content? How does that relate to your thread title? What are you asking for help doing?

Sorry, I’m not clear, it’s been a long weekend. I did not want to post all of the code - it’s huge.

I will if it will help.

I have a table of photograph information. This is for photographers who do not use digital cameras and need technical and business records of their work.

I have subordinate lookup tables for things like, the camera used, the lens used, developer, length of shot, location and country, etc.

I have had this working with built in arrays like this:

$fill_from_array_lens = array(
"50mm"=>"50mm", 
"80mm"=>"80mm",
"210mm"=>"210mm",
"Auto"=>"Auto",
"Other"=>"Other");


$fill_from_array_location = array(
"Skopelos"=>"Skopelos",
"Eperus"=>"Eperus",
"Kefalohia"=>"Kefalohia",
"Persogiani"=>"Persogiani", 
"Other"=>"Other");

$fill_from_array_country = array(
"United States"=>"United States",
"Greece"=>"Greece",
"Albania"=>"Albania",
"France"=>"France",
"France"=>"France", 
"United Kingdom"=>"United Kingdom",
"Other"=>"Other");

//$fill_from_array_film = array(
//"Kodak TriX"=>"Kodak TriX",
//"Digital"=>"Digital",
//"Other"=>"Other");
 

$fill_from_array_exp = array(
"1.8"=>"1.8",
"2"=>"2",
"2.8"=>"2.8",
"4"=>"4",
"5.6"=>"5.6",
"8"=>"8",
"11"=>"11",
"16"=>"16",
"22"=>"22",
"Auto"=>"Auto",
"Other"=>"Other");



$fill_from_array_filmspeed = array(
"2000"=>"2000",
"1000"=>"1000",
"500"=>"500",
"256"=>"256",
"128"=>"128",
"64"=>"64",
"32"=>"32",
"16"=>"16",
"8"=>"8",
"4"=>"4",
"2"=>"2",
"1"=>"1",
"M"=>"M",
"Auto"=>"Auto",
"Other"=>"Other"); 


$fill_from_array_filmISO = array(
"25"=>"25",
"50"=>"50",
"100"=>"100",
"200"=>"200",
"400"=>"400",
"800"=>"800",
"1000"=>"1000",
"1200"=>"1200",
"1500"=>"1500",
"Auto"=>"Auto",
"Other"=>"Other");


This method offers no flexibility, as any change to a table has to be made by me.

Soo, I am starting to build an external array that can be managed by the user.

You can see the current status here:

beatricehamblett.com/db

The u/p is beatrice/Skopelos2009

It’s test data, and I have backups…

As a primary goal, I need to know what I’m doing wrong, in that the key rather than the value, is being passed back.

As an even more primary goal, I’d really appreciate learning if there is a better approach to this. I have a lot to learn.

There’s not really anything that people can help with from just a bunch of arrays - you need to show the code that you’re using to access/interact with the arrays.

At a guess, are you using the array_keys() function at all?

Thanks. I found the problem about an hour ago. I knew I was just pointing to the wrong place -the key rather than the content…

I just couldn’t see beyond that.

Sometimes, especially when you’re an indie, these forum help me to refocus and organize my thinking…

… and sometimes, they provide the answers too…

David