<?php foreach ($searchResult as $row) { ?> $("#PBT<?php echo $row->idUser; ?> ").progressbar({ value: <?php echo MyFunctions::getValueProgressBar($row->scoreTruth->score); ?> }); $("#PBD<?php echo $row->idUser; ?> ").progressbar({ value: <?php echo MyFunctions::getValueProgressBar($row->scoreDare->score); ?> }); <?php } ?> //Dialog box for Friend Request $("#dialog-friendRequest").dialog({ autoOpen: false }) $("#dialog-friendRequest").dialog({ modal: true, buttons: { Ok: function() { $( this ).dialog( "close" ); }