session_start();
$arr = [
'87.98.190.149:3128',
'47.88.189.216:3128',
'203.232.91.168:3128',
'200.54.180.226:80',
'23.97.59.143:3128',
'212.174.135.241:3128',
'62.247.0.25:8080'
];
$count = isset($_SESSION['count']) ? $_SESSION['count'] : 0;
$total = sizeof($arr) - 1;
if($count > $total) $count = 0;
echo $arr[$count];
$count++;
$_SESSION['count'] = $count;
<input type="checkbox" class="checkbox" name="id1"/> 1
<input type="checkbox" class="checkbox" name="id2"/> 2
<input type="checkbox" class="checkbox" name="id3"/> 3
$('.checkbox').change(function(){
var data = [];
$('.checkbox').each(function(){
if( $(this).is(':checked') ){
data.push( $(this).attr('name'));
}
});
console.log(data);
});
$.ajax({
...
dataType: 'JSON',
success: function(response){
otels = response;
}
...
});
$('#checkbox').change(function(){
$.each(otels, function(){
if(this.region == $('#checkbox').val()){
//Тут что-то делаем
}
});
});
<div id="myModal" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
<div class="modal-dialog modal-sm">
<div class="modal-content">
</div>
</div>
</div>
$('#myModal').find('.modal-content').html(json['success']);
$('#myModal').modal('show');