trip272 Posted December 19, 2007 Share Posted December 19, 2007 So I know how to echo all of the data in a table but how do I echo every value of a row based on an index? I am trying to create a php file that echoes row values in the format of: value1=somenumber&value2=somenumber&value3=somenumber ect this is so that I can load this data into flash. I have looked everywhere in search of how to do this any help is appreciated. Quote Link to comment Share on other sites More sharing options...
revraz Posted December 19, 2007 Share Posted December 19, 2007 If you build an array from the row data, then you can just do a foreach loop to echo all the results. Quote Link to comment Share on other sites More sharing options...
trip272 Posted December 19, 2007 Author Share Posted December 19, 2007 If you build an array from the row data, then you can just do a foreach loop to echo all the results. is there an array that holds the names of each field? Or would I be able to to grab that somehow? Quote Link to comment Share on other sites More sharing options...
revraz Posted December 19, 2007 Share Posted December 19, 2007 Yes, mysql_fetch_object($result) Quote Link to comment Share on other sites More sharing options...
corbin Posted December 19, 2007 Share Posted December 19, 2007 Good luck getting the field names out of the object fetch_object creates without previously knowing them.... With mysql_fetch_assoc, the row name will be the array key.... 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.