The array...
Code: Select all
<?php
$thevar = 'beagle';
$creatures = array
(
'cats' => array // $creatures['cats']
(
'chausie',
'ocicat'
),
'dogs' => array // $creatures['dogs']
(
'beagle',
'havanese'
)
);
?>So if programmed right...
1.) if $thevar = 'beagle' then $creature would = 'dogs'
2.) if $thevar = 'chausie' then $creature would = 'cats'