Lab 4 Source code


Task 1

The capital of Netherlands is: Amsterdam The capital of Greece is: Athens The capital of Germany is: Berlin

Task 2

Array ( [Austria] => Vienna [Belgium] => Brussels [Cyprus] => Nicosia [Czech Republic] => Prague [Denmark] => Copenhagen [Estonia] => Tallin [Finland] => Helsinki [France] => Paris [Germany] => Berlin [Greece] => Athens [Hungary] => Budapest [Ireland] => Dublin [Italy] => Rome [Latvia] => Riga [Lithuania] => Vilnius [Luxembourg] => Luxembourg [Malta] => Valetta [Netherlands] => Amsterdam [Poland] => Warsaw [Portugal] => Lisbon [Slovakia] => Bratislava [Slovenia] => Ljubljana [Spain] => Madrid [Sweden] => Stockholm [United Kingdom] => London )

Task 3

Array ( [Netherlands] => Amsterdam [Greece] => Athens [Germany] => Berlin [Slovakia] => Bratislava [Belgium] => Brussels [Hungary] => Budapest [Denmark] => Copenhagen [Ireland] => Dublin [Finland] => Helsinki [Portugal] => Lisbon [Slovenia] => Ljubljana [United Kingdom] => London [Luxembourg] => Luxembourg [Spain] => Madrid [Cyprus] => Nicosia [France] => Paris [Czech Republic] => Prague [Latvia] => Riga [Italy] => Rome [Sweden] => Stockholm [Estonia] => Tallin [Malta] => Valetta [Austria] => Vienna [Lithuania] => Vilnius [Poland] => Warsaw )

Task 4

1. multi-dimensional arrays

$ countFrench

Array ( [0] => zero [1] => un [2] => deux [3] => trois [4] => quatre [5] => cinq [6] => six [7] => sept [8] => huit [9] => neuf [10] => dix )

$ countPortug

Array ( [0] => zero [1] => un [2] => dois [3] => três [4] => quatro [5] => cinco [6] => seis [7] => sete [8] => oito [9] => nove [10] => dez )

$ countEspano

Array ( [0] => cero [1] => uno [2] => dos [3] => tres [4] => cuatro [5] => cinco [6] => seis [7] => siete [8] => ocho [9] => nueve [10] => diez )

$ countPolyGl

Array ( [0] => Array ( [0] => zero [1] => un [2] => deux [3] => trois [4] => quatre [5] => cinq [6] => six [7] => sept [8] => huit [9] => neuf [10] => dix ) [1] => Array ( [0] => zero [1] => un [2] => dois [3] => três [4] => quatro [5] => cinco [6] => seis [7] => sete [8] => oito [9] => nove [10] => dez ) [2] => Array ( [0] => cero [1] => uno [2] => dos [3] => tres [4] => cuatro [5] => cinco [6] => seis [7] => siete [8] => ocho [9] => nueve [10] => diez ) )
2. In one line only

$ pet

Array ( [pet1] => Array ( [name] => Cloudy [type] => dog [color] => white ) [pet2] => Array ( [name] => Cait [type] => cat [color] => orange ) )
3. comments

Task 5

Array ( [Austria] => Vienna [Belgium] => Brussels [Cyprus] => Nicosia [Czech Republic] => Prague [Denmark] => Copenhagen [Estonia] => Tallin [Finland] => Helsinki [France] => Paris [Germany] => Berlin [Greece] => Athens [Hungary] => Budapest [Ireland] => Dublin [Italy] => Rome [Latvia] => Riga [Luxembourg] => Luxembourg [Malta] => Valetta [Netherlands] => Amsterdam [Poland] => Warsaw [Portugal] => Lisbon [Slovakia] => Bratislava [Slovenia] => Ljubljana [Spain] => Madrid [Sweden] => Stockholm [United Kingdom] => London )

this is a blank paragraph to do nothing but take up space and ensure the formatting works