Looking for help with integrating PHP code into a JavaScript script:
var bigData = {
"teams" : [],
"results" : [] };
for( var i=1 ; i<16 ; i+=2 )
{
bigData.teams.push(["<?php echo 1; ?>",'Team '+(i+1)]);
}
for( var j=1 ; j<16 ; j++ ) {
bigData.results.push([1,2]);
}
Struggling to figure out how to properly display PHP code within JavaScript. Does anyone have a solution?
Thanks in advance, Emil