desjardins2010 Posted December 7, 2010 Share Posted December 7, 2010 Hi, me again; i'm curious why this don't work and what would in it's replace; echo "<b>".$row['name'].['id']."</b><BR>"; basically what I'm trying to do is that it read like this Your in game name is ['name'] with id set to ['id'] I figure if I can get the name and id beside each other I can figure out how to the add the your in game name is and with id set to part myself sorry guys don't mean to be a bother Link to comment https://forums.phpfreaks.com/topic/220942-how-come-this-dont-work/ Share on other sites More sharing options...
Pikachu2000 Posted December 7, 2010 Share Posted December 7, 2010 echo "<b>{$row['name']}{$row['id']}</b><BR>"; Link to comment https://forums.phpfreaks.com/topic/220942-how-come-this-dont-work/#findComment-1144063 Share on other sites More sharing options...
desjardins2010 Posted December 7, 2010 Author Share Posted December 7, 2010 hmm nice so just adding the {} to the output fields... thanks Link to comment https://forums.phpfreaks.com/topic/220942-how-come-this-dont-work/#findComment-1144068 Share on other sites More sharing options...
Pikachu2000 Posted December 7, 2010 Share Posted December 7, 2010 You can either use the curly braces as I did above, or you can use string concatenation like below. I personally find the curlies easier to read, especially when there's a lot of other quoting in the string, as there would be in a database query and the like. echo "<b>" . $row['name'] . $row['id'] . "</b><BR>"; Link to comment https://forums.phpfreaks.com/topic/220942-how-come-this-dont-work/#findComment-1144073 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.