1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">
<script language="javascript" type="text/javascript" src="flot/jquery.js"></script>
<script language="javascript" type="text/javascript" src="flot/jquery.flot.js"></script>
<title></title>
</head>
<body>
<h1>test PHP</h1>
<?php
$tmp = array();
for($i=0; $i<1000; $i++){
$tmp[] = array($i,$i);
}
$idpm = 4352;
echo '<div id="placeholder' . $idpm . '" style="width:600px;height:300px;"></div>';
echo '<script type="text/javascript">
$(function () {
//ICI
var bloc= ' . json_encode($tmp) . ';
$.plot($("#placeholder' . $idpm . '"), [ bloc ]);
});
</script>';
?>
</body>
</html> |
Partager