Skip to content

Instantly share code, notes, and snippets.

@DevStrefa
DevStrefa / gist:9dbb885d36b7d5375e961f88f2613718
Created August 29, 2017 10:37 — forked from vxnick/gist:380904
Array of country codes (ISO 3166-1 alpha-2) and corresponding names
<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',
@DevStrefa
DevStrefa / counties.html
Created May 19, 2017 10:23
select counties of ireland
<select name="county">
<option value="antrim">Antrim</option>
<option value="armagh">Armagh</option>
<option value="carlow">Carlow</option>
<option value="cavan">Cavan</option>
<option value="clare">Clare</option>
<option value="cork">Cork</option>
<option value="derry">Derry</option>
<option value="donegal">Donegal</option>
<option value="down">Down</option>
@DevStrefa
DevStrefa / generateRandomString.php
Created March 2, 2017 10:22
Generate Random String
<?php
/**
* Generate random n-length string
*
* Method will generate random string based on given guidelines first parameter is length of returned string,
* next three parameters define which characters will be used to generate output.
*
* @param $length
* @param bool $alphabetCharacters if set to true, output may contain characters from aA to zZ (65-90 AND 97-122 in ASCII)
* @param bool $numbersCharacters if set to true, output may contain characters from 0 to 9 (48-57 in ASCII)