I have posted a similar topic before and didn't get a answer that worked. Properly because my question was lacky. I will try again more specific. Im working on a bracket system plugin.
The plugin works like this:
var bigData = {
teams : [
["Team 1", "Team 2" ],
["Team 3", "Team 4" ],
["Team 5", "Team 6" ],
["Team 7", "Team 8" ],
["Team 9", "Team 10"],
["Team 11", "Team 12"],
["Team 13", "Team 14"],
["Team 15", "Team 16"]
};
You have to manually type the name of the team. I created a push array to create the teams in a for loop:
var bigData = {
"teams" : [],
"results" : [] };
for( var i=1 ; i<16 ; i+=2 )
{
bigData.teams.push(["Team "+i,"okay"
]);
}
The problem is this: i really like to pass in data from php to the teams: i can use mysql, and pass in the team names from a database. The code just wont work! - No matter what i do, u can't pass in <?php ?>
:
bigData.teams.push(["<?php echo 'somethinghere' ?>",'Team '+(i+1)]);
The images looks like this, when there is no <php ?>
https://i.stack.imgur.com/zB6eS.jpg
I can't post two links.. but it's just empty
I hope this is detailed enough to get an understanding of my problem! Thanks