Clear questions and runnable code
get the best and fastest answer
Problem with push() Functionby virtualweb (Sexton)
|on Jul 22, 2009 at 22:58 UTC||Need Help??|
virtualweb has asked for the
wisdom of the Perl Monks concerning the following question:
Im trying to do a web directory similar to Yellow Pages based in a flat file database.
My script saves info in a folder named COUNTRIES in the following manner.
OK, now I need to use this data to present it on the browser. I want to make a one column table so each row in the column will be a different Country. Inserted between countries, in the same column I want to display the respective States registered.
Imagine for USA and Mexico would be:
I went OK as far as the first step (Countries) and ran into trouble when trying to display States as follows:
OK the above code displays a single column table with each country in a row and inserts the states of the first country right below it. Then displays the states of the first and second country right below the second country. Then all the states of the first three countries below the third country,etc. I only need to display the states corresponding to each country right below the country name.
What am I doing wrong..??