Good afternoon ..
I have the following situation:
<?php
$array_dias_da_semana = array("domingo", "segunda", "terca","quarta","quinta","sexta","sabado");
$zebra = 'domingo';
?>
$(function()
{
$('.button').click(function()
{
bb = $(this);
$(".tab-content div").each(function( index )
{
if($( this ).attr('class').indexOf('active') != -1)
{
var vdia = "<?php echo $array_dias_da_semana[index]?>";
alert(" B Indice: " + index+ ' value..: '+ $(bb).val()+ ' - vdia ' + vdia);
}
});
});
});
I can not type this line correctly:
var vdia = "<?php echo $array_dias_da_semana[index]?>";
How should I write ?????
I have ARRAY in PHP that contains 6 dates and the function in javascript that returns the index of the tab.
In the above line how can you realize the index is the return of the function.
With the index I would like to get the date in the corresponding ARRAY index of PHP $ array_dias_da_semana