lingo5 Posted November 10, 2011 Share Posted November 10, 2011 Hi, I have this as part of my shopping basket: $ATC_itemDescription = "".$row_productos_RS['color_eng'] .""; and I want to replace the _eng bit with my language session like this: $ATC_itemDescription = "".$row_productos_RS['color_<?php echo ($_SESSION['session_idioma']);?>'] .""; but t doesn't work...I getthe following error Parse error: syntax error, unexpected T_STRING, expecting ']' in /usr/home/web/productos.php on line 162 Please help. Thanks Link to comment https://forums.phpfreaks.com/topic/250886-please-help-with-syntax/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 10, 2011 Share Posted November 10, 2011 $ATC_itemDescription = $row_productos_RS['color_'.$_SESSION['session_idioma']]; Link to comment https://forums.phpfreaks.com/topic/250886-please-help-with-syntax/#findComment-1287132 Share on other sites More sharing options...
lingo5 Posted November 10, 2011 Author Share Posted November 10, 2011 thanks...but it's the "color_eng" part I need to attach the language session to... Link to comment https://forums.phpfreaks.com/topic/250886-please-help-with-syntax/#findComment-1287134 Share on other sites More sharing options...
lingo5 Posted November 10, 2011 Author Share Posted November 10, 2011 ooops..sorry!!!...my mistake I read it wrong..THNAKS ALOT IT WORKS FINE. Link to comment https://forums.phpfreaks.com/topic/250886-please-help-with-syntax/#findComment-1287140 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.