Miss-Ruth Posted November 4, 2009 Share Posted November 4, 2009 Hey!! Please help me assign variables to this echos. I know nothing about php :-\ // I need something like this: echo "category=... $query = "SELECT * FROM yomails WHERE identity = '$SomeVar'"; $results = mysql_query($query); if($line = mysql_fetch_assoc($results)) { echo $line["category"]; echo $line["namez"]; echo $line["col1"]; echo $line["col2"]; echo $line["col3"]; echo $line["col4"]; echo $line["col5"]; echo $line["col6"]; echo $line["col7"]; } mysql_close($link); ?> Link to comment https://forums.phpfreaks.com/topic/180307-assigning-variables/ Share on other sites More sharing options...
lemmin Posted November 4, 2009 Share Posted November 4, 2009 Just add the literal string to the beginning and concatenate it with the '.' operator. echo "category=".$line["category"]; Link to comment https://forums.phpfreaks.com/topic/180307-assigning-variables/#findComment-951149 Share on other sites More sharing options...
Miss-Ruth Posted November 4, 2009 Author Share Posted November 4, 2009 WoW! that's it? so simple... Thanks lemmin. <3 Link to comment https://forums.phpfreaks.com/topic/180307-assigning-variables/#findComment-951152 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.