Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

variable variables in arrays

Status
Not open for further replies.

IB2

IS-IT--Management
Jun 7, 2003
3
US
I am trying to do a lookup list which can be used by different tables and users with different list requirements. This involves having a table of column headings and fields to be displayed, linked to the main lookup record which defines the table to be listed etc.

Obviously the idea is to use the table of column headings to show the correct data in the lookup list.
I now have an array which contains the names of the variables I want to display across the way in the table.

The problem is that the field in this variable is also an array.

So I have an array called $lines, which itself contains, say, $rows['customer_name'](Dreamweaver style).

I would like it to display the actual customer name but it comes up saying the variable $rows['customer_name'] is undefined, although if you reference it directly, it works so the variable itself is visible.

I've looked at the PHP manual which tells you to put extra {} round things but this doesn't seem to work (or more likely, I don't understand it) , it still shows the correct variable/array name and says its undefined.

If anyone actually understands what I am trying to say, some help would be greatly appreciated.

 
Its sorted - the whole thing was overcomplicated and doesn't need variable variables, just a variable in the array suffix.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top