What Does It Mean?

In the code below, I want to know what does " $states.$_country " mean, what does it do at line :


<br />
{foreach from=$states.$_country item=state}<br />

```<br />
<br />
templates/views/profiles/components/profile_fields.tpl<br />
```php
<br />
	{if $field.field_type == "A"}  {* State selectbox *}<br />
		{$_country = $settings.General.default_country}<br />
		{$_state = $value|default:$settings.General.default_state}<br />
	  <br />
	  <br />
		<select {if $field.autocomplete_type}x-autocompletetype="{$field.autocomplete_type}"{/if} id="{$id_prefix}elm_{$field.field_id}" class="ty-profile-field__select-state cm-state {if $section == "S"}cm-location-shipping{else}cm-location-billing{/if} {if !$skip_field}{$_class}{/if}" name="{$data_name}[{$data_id}]" {if !$skip_field}{$disabled_param nofilter}{/if}><br />
	  <br />
			<option value="">- {__("select_state")} -</option><br />
			{if $states && $states.$_country}<br />
				{foreach from=$states.$_country item=state}<br />
					<option {if $_state == $state.code}selected="selected"{/if} value="{$state.code}">{$state.state}</option><br />
				{/foreach}<br />
			{/if}<br />
	  <br />
		</select><input {if $field.autocomplete_type}x-autocompletetype="{$field.autocomplete_type}"{/if} type="text" id="elm_{$field.field_id}_d" name="{$data_name}[{$data_id}]" size="32" maxlength="64" value="{$_state}" disabled="disabled" class="cm-state {if $section == "S"}cm-location-shipping{else}cm-location-billing{/if} ty-input-text hidden {if $_class}disabled{/if}"/><br />

You have an array that consists of elements like:

States[country] (I.e. states[USA] like $states['USA']=>Oregon)

and it is using that to loop through. In PHP parlance it would be:

foreach($states[$_country] as $state)



So basically it is waling the list of states designed by whatever value $_country has.

thanks

Wow, my spelling sucks!

waling = walking

designed = defined



Guess I should do a bit more proof reading…