This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $nationals = array( | |
| 'Afghan', | |
| 'Albanian', | |
| 'Algerian', | |
| 'American', | |
| 'Andorran', | |
| 'Angolan', | |
| 'Antiguans', | |
| 'Argentinean', | |
| 'Armenian', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $countries = array("Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Island |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $countries = array( | |
| 'AF' => 'Afghanistan', | |
| 'AX' => 'Åland Islands', | |
| 'AL' => 'Albania', | |
| 'DZ' => 'Algeria', | |
| 'AS' => 'American Samoa', | |
| 'AD' => 'Andorra', | |
| 'AO' => 'Angola', | |
| 'AI' => 'Anguilla', | |
| 'AQ' => 'Antarctica', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| //There we go, that's better now | |
| $countries = array(); | |
| $countries[1] = array( | |
| 'code' => 1, | |
| 'name' => "Canada (+1)" ); | |
| $countries[2] = array( | |
| 'code' => 86, | |
| 'name' => "China (+86)" ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function hello_world() { | |
| // a world subset | |
| $countries = array('USA', 'Germany', 'Spain', 'Austraila'); | |
| print_r($countries); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Licensed to the Apache Software Foundation (ASF) under one | |
| * or more contributor license agreements. See the NOTICE file | |
| * distributed with this work for additional information | |
| * regarding copyright ownership. The ASF licenses this file | |
| * to you under the Apache License, Version 2.0 (the | |
| * "License"); you may not use this file except in compliance | |
| * with the License. You may obtain a copy of the License at | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| * Created on Sep 28, 2009 | |
| * @author Neill Russell <n@enru.co.uk> | |
| */ | |
| if($argc < 2) die(sprintf("Usage: %s <MAGENTO_ROOT>\n", $_SERVER['SCRIPT_FILENAME'])); | |
| define('MAGENTO_DIR', realpath($argv[1])); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function country_dropdown ( $name="country", $top_countries=array(), $selection=NULL, $show_all=TRUE ) { | |
| // You may want to pull this from an array within the helper | |
| $countries = config_item('countries'); | |
| $html = "<select name='{$name}' id='{$name}'>"; | |
| $selected = NULL; | |
| if(in_array($selection,$top_countries)) { | |
| $top_selection = $selection; | |
| $all_selection = NULL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $countries = Array( | |
| 'AF' => 'Afghanistan', | |
| 'AL' => 'Albania', | |
| 'DZ' => 'Algeria', | |
| 'AS' => 'American Samoa', | |
| 'AD' => 'Andorra', | |
| 'AO' => 'Angola', | |
| 'AI' => 'Anguilla', | |
| 'AG' => 'Antigua And Barbuda', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AFG | Afghanistan | |
| ALB | Albania | |
| DZA | Algeria | |
| ASM | American Samoa | |
| AND | Andorra | |
| AGO | Angola | |
| AIA | Anguilla | |
| ATA | Antarctica | |
| ATG | Antigua and Barbuda | |
| ARG | Argentina |