$data_nested = array('first_key' => 'first', 'second_key' => 'second');
$data = array();
$data['single'] = 'single value';
$data['nested'] = $data_nested;
echo $data['nested']['second_key']; // second
echo json_encode($data);
<div ng-controller="tabsMenu" ng-init="tab = 3; settingsMenu" class="ng-tab">
<ul>
<li ng-repeat="item in settingsMenu" ng-class="{active:tab === settingsMenu[$index].id }"
ng-click="tab = settingsMenu[$index].id">
<p>{{item.name}}</p>
<p ng-show="tab === $index">{{ item.desc }}</p>
</li>
</ul>
</div>
<input onClick="this.setSelectionRange(0, this.value.length)" value="Sample Text" />