i am newbie here.. this my first post.. please help me how to call example:-
var a1 = "car";
var n = 1;
alert(a+n); // not working
alert((a+1)); // not working
alert([a+n]); // not working
alert(a+[n]); // not working
i want combine string and number to return alert.. i mean not return with alert(a1) ..
same with id :-
var a1 = document.getElementById("myid");
a1.value = "car";
alert(a+n.value); // not working
alert((a+1).value); // not working
alert([a+n].value); // not working
alert(a+[n].value); // not working
in php :
$n = 1; echo "
var a".$n." = 'car'; alert(a".$n."); // i want similar like this";
how about javascript??..
thanks 1000x....