headmine Posted April 9, 2009 Share Posted April 9, 2009 I am sorta new to php. I know how to do this in asp. I don't get any errors when I do this but nothing outputs. Basically I want it to look at the values being pulled from the database. If there is no data in the field I would like it to print out. "N/A" Here is what I have. $myFixedArray[0] = $row_rs_letter['bq1']; $myFixedArray[1] = $row_rs_letter['bq2']; $myFixedArray[2] = $row_rs_letter['bq3']; $myFixedArray[3] = $row_rs_letter['bq4']; $myFixedArray[4] = $row_rs_letter['ny']; $myFixedArray[5] = $row_rs_letter['bq8']; $myFixedArray[6] = $row_rs_letter['bq9']; $myFixedArray[7] = $row_rs_letter['Q3367']; $myFixedArray[8] = $row_rs_letter['Q3363']; $myFixedArray[9] = $row_rs_letter['Q3362']; $whois = $_GET['ID']; foreach($myFixedArray as $key => $value) { if ($myFixedArray == "") { echo ("N/A"); } } Thanks in advance! Quote Link to comment Share on other sites More sharing options...
taquitosensei Posted April 9, 2009 Share Posted April 9, 2009 not sure what you're trying to accomplish here. But if you're trying to checke each value something more like this $myFixedArray[0] = $row_rs_letter['bq1']; $myFixedArray[1] = $row_rs_letter['bq2']; $myFixedArray[2] = $row_rs_letter['bq3']; $myFixedArray[3] = $row_rs_letter['bq4']; $myFixedArray[4] = $row_rs_letter['ny']; $myFixedArray[5] = $row_rs_letter['bq8']; $myFixedArray[6] = $row_rs_letter['bq9']; $myFixedArray[7] = $row_rs_letter['Q3367']; $myFixedArray[8] = $row_rs_letter['Q3363']; $myFixedArray[9] = $row_rs_letter['Q3362']; $whois = $_GET['ID']; foreach($myFixedArray as $key => $value) { if ($value == "") { echo ("N/A"); } } Quote Link to comment Share on other sites More sharing options...
headmine Posted April 9, 2009 Author Share Posted April 9, 2009 Wow... One little word... I guess that's part of programming fun... Thanks soo much! 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.