Last active
December 11, 2016 14:44
-
-
Save Omranic/573b815c28b243c0065b7786e3014617 to your computer and use it in GitHub Desktop.
Code sample for rinvex/country package
This file contains 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 | |
// Get single country | |
$egypt = country('eg'); | |
// Get country name // Get country native name | |
echo $egypt->getName(); echo $egypt->getNativeName(); | |
// Get country official name // Get country ISO 3166-1 alpha2 code | |
echo $egypt->getOfficialName(); echo $egypt->getIsoAlpha2(); | |
// Get country area // Get country borders | |
echo $egypt->getArea(); echo $egypt->getBorders(); | |
// Get country currencies // Get country languages | |
echo $egypt->getCurrencies(); echo $egypt->getLanguages(); | |
// Get country emoji // Get country flag | |
echo $egypt->getEmoji(); echo $egypt->getFlag(); | |
// Get all countries | |
$countries = countries(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment