View Single Post
  #1  
Old 02-10-2009, 06:28 AM
 
AMMoyer AMMoyer is offline
 

Senior Member
  
Join Date: Nov 2008
Posts: 150
 

Default Pulling value from multi-dimensional array

Is there a way to pull a single value directly from a multidimensional array? I have looked through the Smarty documentation and some PHP books I have but no luck.

I use the array to populate a dropdown menu and I want to show the selected name, not the underlying value, in a template. I could do this in the PHP file and assign a $makename variable to use or I think it would be more correct to retrieve the name in the template. Also, the array is dynamic based on what year you have selected.

Example array:
Array (37)
0 => Array (2)
makeid => "58"
makename => "Acura"
1 => Array (2)
makeid => "73"
makename => "Audi"
2 => Array (2)
makeid => "31"
makename => "BMW"
3 => Array (2)
makeid => "45"
makename => "Buick"


__________________
Adam
X-Cart Gold 4.4.5 - Live
X-Cart Gold 4.1.11 - Retired
X-Payments 1.0.4
CDSEO Pro
EWD Hosting
Reply With Quote