<?php
require_once 'dy_functions.php';
$result = queryMysql("SELECT * FROM task");
$num = $result->num_rows;
$date = array();
for ($i = 0 ; $i < $num ; $i++)
{
$row = $result->fetch_array(MYSQLI_ASSOC);
$date = $row[$i];
}
echo json_encode ($date);
?>
<?php
require_once 'dy_functions.php';
$result = queryMysql( 'SELECT * FROM task' );
$date = array();
while ( ( $row = $result->fetch_array( MYSQLI_ASSOC ) ) !== false ) {
$date[] = $row;
}
echo json_encode( $date );
for ( $i = 0 ; $i < $result->num_rows ; $i ++ ) {
$date[] = $result->fetch_array( MYSQLI_ASSOC );
}
[{"idt":"1","tlogin":"dyoo2","theader":"","ttext":"","tprice":"0"},{"idt":"2","tlogin":"dyoo2","theader":"","ttext":"","tprice":"0"},{"idt":"3","tlogin":"dyoo2","theader":"esdfds","ttext":"dsfsdfdsfdsf","tprice":"555"},{"idt":"4","tlogin":"dyoo2","theader":"\u0421\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u043e \u0434\u043e\u043c\u0430.","ttext":"\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u043e\u043c \u0438\u0437 \u043d\u0430\u0448\u0438\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432.\r\n\r\n\u041f\u0440\u0438 \u043d\u0435\u0445\u0430\u0442\u043a\u0435 \u0434\u043e\u043a\u0443\u043f\u0430\u044e\u0442\u044c\u0441\u044f \u043f\u043e \u043f\u0440\u0435\u0434\u0432\u043e\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044e.\r\n\r\n\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e 130 \u043c2.","tprice":"300"},{"idt":"5","tlogin":"dyoo2","theader":"\u041a\u0443\u043f\u043b\u044e","ttext":"\u041b\u0430\u043b\u0430\u043b\u0430\u043b\u0430\r\n\r\n\u043b\u0430\u043b\u0430\u043b\u0430\u043b\u0430","tprice":"800"}]