Echo-ing Only Available Database Result
<p>I have this Associative Array :</p>

<pre><code>$Fields = array("row0"=&gt;"Yahoo ID", "row1"=&gt;"MSN ID", "row2"=&gt; "Gtalk ID");
</code></pre>

<p>on the other side, I have this SQL query :</p>

<pre><code>SELECT YahooID, MSNID, GTalkID From UserTable WHERE Username = '$Username' LIMIT 1;
</code></pre>

<p>the result maybe vary, because some users only have Yahoo ID and some have others. for example if I have this result :</p>

<pre><code>$row[0] = NONE //means YahooID = NONE
$row[1] = example@msn.com
$row[2] = example@gmail.com
</code></pre>

<p>then how to have this as an output (echo) :</p>

<p>MSN ID = example@msn.com</p>

<p>Gtalk ID = example@gmail.com</p>

<p>since Yahoo ID is not exist, then the result will be MSN and Gtalk only. 'MSN ID' and 'Gtalk ID' is variable from Associative Array, while 'example@msn.com' and 'example@gmail.com' from SQL result.</p>

<p>thanks!</p>
