overdosedgames Posted April 8, 2012 Share Posted April 8, 2012 I want result of this as a variable foreach($results as $result) { echo "(filename = '".$result['filename']."') OR "; } what I essentially want $pick = foreach($results as $result) { echo "(filename = '".$result['filename']."') OR "; } but that doesn't work Link to comment https://forums.phpfreaks.com/topic/260564-how-can-i-put-this-into-a-variable/ Share on other sites More sharing options...
dcro2 Posted April 8, 2012 Share Posted April 8, 2012 $pick = ""; foreach($results as $result) { $pick .= "(filename = '".$result['filename']."') OR "; } Read String Operators. Link to comment https://forums.phpfreaks.com/topic/260564-how-can-i-put-this-into-a-variable/#findComment-1335389 Share on other sites More sharing options...
overdosedgames Posted April 8, 2012 Author Share Posted April 8, 2012 great thanks Link to comment https://forums.phpfreaks.com/topic/260564-how-can-i-put-this-into-a-variable/#findComment-1335402 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.