Well, it only makes sense to have a variable already in existence if you're going to compare it to some other value. PHP issues a NOTICE level warning that you can suppress if you want to -- just set error_reporting to "E_ALL & ~E_NOTICE" (in English: "Report all errors except E_NOTICE").
However, initializing variables is easy:
if (! isset($var)) { $var = ''; } // string
if (! isset($var)) { $var = array(); } // array
if (! isset($var)) { $var = 0; } // int
if (! isset($var)) { $var = 0.0; } // float
if (! isset($var)) { $var = FALSE; } // boolean
As far as where you get your list of countries, I would imagine that this info comes with your user viewer script in the book. I don't have the book, nor do I have the code for it, nor do I have the time to download it and look through it.
If you don't have the list of countries, I suggest you create a database table that stores all the countries you're interested in, and use that table to generate whatever you need -- be it an HTML <select> dropdown, or a PHP array, whatever.
Take care,
Nik
http://www.bigaction.org/