bob_the _builder Posted September 27, 2006 Share Posted September 27, 2006 Hi,Is there a way to place an sql query between:echo 'some html here';without breaking the echo and starting it again?Its to populate a list/menu fom the db which is within echo.Thanks Quote Link to comment Share on other sites More sharing options...
alpine Posted September 27, 2006 Share Posted September 27, 2006 do the query first and display the desired result within, like[code]<?phpwhile($r=mysql_fetch_array($query)){ $option .="<option value".$r['xx'].">".$r['xxx']."</option>";}echo <<<__HTML<select name="x">$option</select>__HTML;?>[/code] Quote Link to comment Share on other sites More sharing options...
bob_the _builder Posted September 28, 2006 Author Share Posted September 28, 2006 That did the trickThanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.