-1
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’t spell this line correctly:
var vdia = "<?php echo $array_dias_da_semana[index]?>";
How should I write?????
I have the PHP ARRAY that contains 6 dates and the javascript function that returns the tab index.
In the line above as you can see the index is the return of Function.
With the index I would like to get the date in the corresponding PHP ARRAY Indice $array_dias_da_week
Good afternoon. Thank you for your attention :). I would like to point out that with the "direction" of our colleague Sergio achieve the desired result. Hugs :)
– Ricardo M.Souza
@Ricardom.Souza blz, mine is a complement to understand how web applications work (HTTP communication)
– Guilherme Nascimento
Absolutely.. I’ve read the two links you mentioned. Perfect :)
– Ricardo M.Souza