The way to do it is as follows:
var cpt= new Array();
$('.cpt_code').each(function() {
console.log( $(this).val() );
//alert($(this).val());
cpt[x]=$(this).val();
x++;
})
The way to do it is as follows:
var cpt= new Array();
$('.cpt_code').each(function() {
console.log( $(this).val() );
//alert($(this).val());
cpt[x]=$(this).val();
x++;
})