almightyegg Posted January 14, 2007 Share Posted January 14, 2007 i have a line of code:<? echo $profile[d.o.b]; ?>but it doesnt show naything so i changed it to:<? echo "$profile[d.o.b]"; ?>and it came up with:Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in /home/koggdesi/public_html/communitalk/user/profile.php on line 59any ideas on how i can get it to show??? Link to comment https://forums.phpfreaks.com/topic/34142-pulling-info-from-database/ Share on other sites More sharing options...
Barand Posted January 14, 2007 Share Posted January 14, 2007 try[code]echo $profile['d.o.b'];[/code]Always put string values in quotes otherwise they're assumed to be constants. Link to comment https://forums.phpfreaks.com/topic/34142-pulling-info-from-database/#findComment-160597 Share on other sites More sharing options...
almightyegg Posted January 14, 2007 Author Share Posted January 14, 2007 thanks :) will do in future Link to comment https://forums.phpfreaks.com/topic/34142-pulling-info-from-database/#findComment-160599 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.