Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function buildJSON($result)
- {
- for ($i=0; $i < mysql_num_fields($result); $i++)
- {
- $row = mysql_fetch_assoc($result, $i);
- $showid = '"show' . $i . '"';
- $showdata = json_encode($row);
- if ($i == (mysql_num_fields($results) - 1))
- {
- $build_string = $showid . ':' . $showdata;
- }
- else
- {
- $build_string = $showid . ':' . $showdata . ',';
- }
- $build_string->$total_string;
- }
- return "'{' . $totalstring . '}'"
- }
Add Comment
Please, Sign In to add comment