Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- while($row = mysqli_fetch_assoc($sql)) {
- ....
- $array_tmp = array();
- $array_tmp["black_0"] = $black;
- $array_tmp["red_1" ] = $red;
- $array_tmp["blue_1" ] = $blue;
- };
- $dataset[] = $array_tmp;
- echo json_encode($dataset, JSON_UNESCAPED_UNICODE);
- ?>
- $.ajax({
- ...
- success: function(response){
- dataSet = JSON.parse(response);
- $.each(dataSet[0], function(key, value){
- var active = key.substr(key.length - 1);
- });
- }
- });
Add Comment
Please, Sign In to add comment