PHP - Moved: Select Province/state For One Country Only
This topic has been moved to JavaScript Help.
http://www.phpfreaks.com/forums/index.php?topic=345840.0 Similar Tutorialshey guys just wondering what u think the best way to do this.....on my form registration for users....I have a drop down for countrys....but I dont want to have 2 drop downs 1 for state and 1 for province if they choose canada/usa....I have seen alot of java scrit on such sites where if you choose Canada for country, then it switches to a drop down for just provinces, not states. Same for zip code/postal code...american zip code would be like 90210 where as a postal code would be like n5j2S1. Is there a script or something already I can use with all the countrys/provinces/states etc already entered so im not re-inventing the wheel here? If someone can point me in right directon id appreciate it. Thanks Hi, I have a search form where users can search by age and country. Users can also save their search so they can go back and do it again but the problem is when they reload their saved search, I need it to select the country that has been saved in the drop down. So if someone searched the United Kingdom, I need it to show United Kingdom in the select drop down instead of (Select Country). Is there any easy and quick way around this? Many Thanks This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=353007.0 I am trying to invert some arrays, making the x-values y, and the y-values x. I have found the code that works, but I cannot understand for the life of me, I have a multidimensional $data array; that looks like this: Code: [Select] row:0 :: Country:Algeria row:1 :: Country:USA row:2 :: Country:Morocco The following code successfully extracts the appropriate 'column' from my array. Code: [Select] foreach($data as $value){ $invert['country'][] = $value['country']; } It returns: Code: [Select] $invert['country'] = Algeria, USA, Morocco But this makes no sense, it seems more logical that the code should be: Code: [Select] foreach($data as $value){ $invert[] ['country']= $value['country']; } Since we are accepting all values of the first array, and then specifying the second array. What am I missing here? Why is it working backwards? This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=359083.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=312305.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=306496.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=320341.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=310935.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=357712.0 This topic is now in MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=357554.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=348848.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=343149.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=347920.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=305968.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=309828.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=350716.0 This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=359241.0 This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=313023.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=347324.0 |