I have the a include file with a list of objects defined. For this ex I'll use the furniture
define( 'F_MB', "Mahagony Bed");
define( 'F_OB', "Oak Bed");
This define list is used a lot on the site and changes quite a bit and there is a lot more to each one than just "oak bed". I have a db with other values about the furniture and each entry has it's name "mb" and ob". I use this name for several other things in this function, so I do a strtoupper() to get the caps I need for the define to work correctly.
What I am trying to do is display the name of the furny below it's image. I do a query and get all the info and we'll say the name is stored as $name.
So I should be able to say:
echo F_ .$name; and then get what is stored there such as Oak Bed, but I don't get. It prints out F_OB.
If I do this on seperate line:
echo F_OB, it prints the value that is defined. I tried several things to try and put the 2 strings together into a seperate string and print that, but I still just get F_OB no matter what. Any ideas. I can't just put the actual name in the db, because everytime I want to change those values, I'll have to do it on the include file and the db. I though about only keeping them in the db, but then on the several times I use those names on the site, I'd do a query each time jsut to get names and seems much better to just do an echo F_OB. Thanks for the help