I'm trying to populate my dropdown using an array on another page so here is what I've got I need to populate my dropdown select a list of nationalities, so far I've got an array of list of nationalities but I cannot populate the select box on the array.
on my fetch.php
I've got
<?php include('nationality.php') ?>
<select id="register-nationality" name="registerNationality" required data-msg="Please select your Nationality" class="form-control">
<option>Select Nationality</option>
<?php
foreach ($nationality as $national) {
echo "<option value='$nationals'>$nationals</option>";
}
?>
</select>
and in the nationality.php
here is where I got the list of nationalities and it is an array.
so here is a sample of the code it is too long so I will give you the sample
<?php
$nationals = array(
'Afghan',
'Albanian',
'Algerian',
'American',
'Andorran',
'Angolan',
'Antiguans',
'Argentinean',
'Armenian',
'Australian',
'Austrian',
'Azerbaijani',
'Bahamian',
'Bahraini',
'Bangladeshi',
'Barbadian',
'Barbudans',
..
..
.. and so on
);
?>
and so nothing is showing.