azunoman Posted September 5, 2008 Share Posted September 5, 2008 Current Display my DB column data as following: echo $row_rs_ruedas['ProdName']; I want to change the field name 'ProdName' by placing the language selected variable $lang so that the correct DB column data is the correct language say 'Esp'. In my DB for example I have ProdName and ProdNameEsp. I have looked into localization and will return to that but for now if I could just switch to see eng/esp data....that be bomb for starters. I know it's a novice sort of question...I am using DW CS3/siteassist and really don't have to code to much which is kinda nice as I don't go off into the woods as much...I am an old assembler 370 programmer so coding in macro language is always more of a challenge. Off:Subject What would be really nice if the PHP manual and adopted BNF schemas for their documentation. It would make it so much easier to visulaize how one could concatenate and do more complex expressions. Thanks, Fred Quote Link to comment https://forums.phpfreaks.com/topic/122929-solved-concatenating-two-variable-to-make-one-name-for-da-echo/ Share on other sites More sharing options...
DarkWater Posted September 5, 2008 Share Posted September 5, 2008 Can you please explain some more? I don't really get what you're asking. >_> Quote Link to comment https://forums.phpfreaks.com/topic/122929-solved-concatenating-two-variable-to-make-one-name-for-da-echo/#findComment-634880 Share on other sites More sharing options...
azunoman Posted September 5, 2008 Author Share Posted September 5, 2008 Current Display my DB column data as following: echo $row_rs_ruedas['ProdName']; I want to change the field name 'ProdName' by placing the language selected variable $lang so that the correct DB column data is the correct language say 'Esp'. TO-->echo $row_rs_ruedas['ProdNameEsp']; Esp would be a variable like $lang = Esp In my DB for example I have ProdName and ProdNameEsp. Quote Link to comment https://forums.phpfreaks.com/topic/122929-solved-concatenating-two-variable-to-make-one-name-for-da-echo/#findComment-634884 Share on other sites More sharing options...
BlueSkyIS Posted September 5, 2008 Share Posted September 5, 2008 try the . concatenation operator: $suffix = 'Esp'; echo $row_rs_ruedas['ProdName'.$suffix]; Quote Link to comment https://forums.phpfreaks.com/topic/122929-solved-concatenating-two-variable-to-make-one-name-for-da-echo/#findComment-634886 Share on other sites More sharing options...
DarkWater Posted September 5, 2008 Share Posted September 5, 2008 Yeah, now I get it, lol. BlueSkyIS has the right idea. Quote Link to comment https://forums.phpfreaks.com/topic/122929-solved-concatenating-two-variable-to-make-one-name-for-da-echo/#findComment-634888 Share on other sites More sharing options...
azunoman Posted September 5, 2008 Author Share Posted September 5, 2008 Thanks...I confused you DarkWater with all the babble beyond the original question. Much appreciation for your and BlueSkyIS's time. Quote Link to comment https://forums.phpfreaks.com/topic/122929-solved-concatenating-two-variable-to-make-one-name-for-da-echo/#findComment-634891 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.