mysql - display every record on new line in php response


$sql_query = "select * from app_faculty";

    $result = mysql_query($sql_query) or die("Error : ".mysql_error());

    while($row = mysql_fetch_array($result, MYSQL_ASSOC))


         $business_array[] = $summary_array;


$new_array["response"]= $business_array;    

$output = json_encode($new_array);

echo $output."<br />";

I want to display records from sql on new line after every { } brackets. It should be displayed one after another and within [ ] brackets

People are also looking for solutions to the problem: timer - Getting SUM by adding time in PHP


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.