I eventually want to pull the state_name and state_link. Format the data as a menu and assign it to a variable so I can drop it into a template.
--------------- Added [DATE]1193673468[/DATE] at [TIME]1193673468[/TIME] ---------------
Quote:
Originally Posted by Lynne
Just a little explanation that may help out. Your first line does a read query and the results from the query (which are actually pointers, not actual results) go into a variable called $getstate. Your next line needs to go through the results of that query and so they assign a new variable to the array they are fetching. So, your second line makes no sense. You need to assign a new variable name to go through the array, like "while ($result = $db->fetch_array($getstate))". Now you can actually do something with the variable called "$result". Normally you would call the variable as "$result['state_name']" (don't quote me on the use of the single quotes there, I've never understood when to use then and when not, I'm a trial and error coder). So, you could say "$mytest = $result['state_name'];" and then spit out the variable $mytest in your code.
|
Thanks for this too... You both have been a great help.
After reading the code again I did realize that I had the $results and $getstate flipped.
I will try out this newly-founded knowledge and see if I can get it to work. If I can...this will be great!
--------------- Added [DATE]1193676153[/DATE] at [TIME]1193676153[/TIME] ---------------
Thank you very much, I now understand how to do this and it's runnin' just like I want!