PHP foreach Döngüsünde Son Değer Değilse Virgül Ekle
determine the last iteration in a php foreach loop?()
foreach ($array as $key => $value) {
echo $value;
if ($key !== array_key_last($array)) echo ", ";
}
foreach ($array as $key => $value) {
echo $value;
if ($key !== array_key_last($array)) echo ", ";
}
jQuery(document).ready(function( $ ){
$('.nav-next .meta-nav').text('Sonraki yazı');
$('.nav-previous .meta-nav').text('Önceki yazı');
});
var data_ajax = $('#form').serialize() + '&quantity='+quantity+'&name=Ali';
$.ajax({
url: 'index.php',
type: 'POST',
data: data_ajax,
dataType: 'json',
beforeSend: function() {
$('#button').button('loading');
},
complete: function() {
$('#button').button('reset');
},
success: function(json) {
//..
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
var data_ajax = $('#form').serializeArray();
data_ajax.push({name: 'quantity', value: quantity});
data_ajax.push({name: 'name', value: 'Ali'});
$.ajax({
url: 'index.php',
type: 'POST',
data: data_ajax,
dataType: 'json',
beforeSend: function() {
$('#button').button('loading');
},
complete: function() {
$('#button').button('reset');
},
success: function(json) {
//..
},
error: function(xhr, ajaxOptions, thrownError) {
alert(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
}
});
nano ~/.inputrc
set completion-ignore-case onset show-all-if-ambiguous onTAB: menu-complete