scottybwoy Posted November 10, 2006 Share Posted November 10, 2006 How do I get to see the result of this Array :[code]<?phpecho "You searched for $company"; $this->appCon(); $sql = mssql_query("SELECT * FROM customers WHERE company = '" . $company . "'") or die("Customer query failed"); $recordset_array = mssql_fetch_assoc($sql); print "This Array contains $recordset_array ";?>[/code]All it prints is this :You searched for CYMAR ELECTRONICS LTDThis Array contains ArrayI just want to test that it is returning the right info Link to comment https://forums.phpfreaks.com/topic/26812-printing-array-solved/ Share on other sites More sharing options...
heckenschutze Posted November 10, 2006 Share Posted November 10, 2006 It's an array not a string, you cannot echo the contents of the array in that sense...use:[code]print "This Array contains <pre>";print_r($recordset_array);print "</pre>";[/code] Link to comment https://forums.phpfreaks.com/topic/26812-printing-array-solved/#findComment-122617 Share on other sites More sharing options...
scottybwoy Posted November 10, 2006 Author Share Posted November 10, 2006 Great Thanks heckenschutze, wasn't sure how to do it ;) Link to comment https://forums.phpfreaks.com/topic/26812-printing-array-solved/#findComment-122634 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.