Reputation: 55
I have stange error, I don't understand why my images can't display.
echo "<div id='img' style='height':200px;'width':200px></div>";
echo "<script type='text/javascript'>
var tab_nb_match_par_user = ".json_encode($tab_nb_match_par_user).";
//chart 1
var line1 = [];
for (var k in tab_nb_match_par_user) {
line1.push([k, tab_nb_match_par_user[k]/2]);
}
var taille = 70;
for (var k in tab_nb_match_par_user){
$('#img').append('<img src='stats_matching/' + k + '.gif' alt=' + k + ' title=' + k + ' width=' + taille + ' />');
taille = taille-6;
}</script>";
Upvotes: 0
Views: 295
Reputation: 421
You had quotes where you shouldn't have. You don't need quotes around css properties inside the style tag.
echo "<div id='img' style='height:200px;width:200px;'></div>";
Upvotes: 1