how to break results inside a variable into lines and do foreach for each line
<p>Hello I'm coding a searching system via Ajax abit different one and I have a problem, is it possible to break data fetch through ajax and do <strong>foreach</strong> for each line in javascript?</p>

<p>Here I send the user's search query to a php file which gives back results from database for that query.. </p>

<pre><code>    $.post("rpc.php", {queryString: ""+inputString+""}, function(data) { 


        $('#suggestions').html(data); // Fill the suggestions div
    });
</code></pre>

<p>so data coming from php file is stored inside <strong>data</strong> variable as a set but line by line,like example..</p>

<pre><code>Google helps us
Facebook is a social network
Stackoverflow is the best
Im on twitter
</code></pre>

<p>but             </p>

<pre><code>$('#suggestions').html(data);
</code></pre>

<p>will directly put all the things inside <strong>data</strong> to suggestions html element..</p>

<p>I want to know is it possible to break things inside <strong>data</strong> to lines and do <strong>foreach</strong> for each line...</p>
