i have created a php code with some help in which i fetched out all similar arrays in my mysql table using while loop... the code is`
<?php
include("connection.php");
global $con;
$sql1= "SELECT name FROM vi_books ORDER BY views DESC";
$query1= mysqli_query($con,$sql1);
while ($row = mysqli_fetch_assoc($query1)) {
$new_row=htmlspecialchars($row['name']);
echo "<br>";
echo $new_row;
}
?>
`
Now i wanted to manipulate the result array using list function so that i can echo only some specific results. Supposedly, i want to run the following code
list($s1,$s2)=$new_row;
echo $s1."and".$s2;
But on running this nothing is showing(like empty values are been passed in my list function variables). Plzz help me out. I guess i need AJAX or JS to manipulate the array result as i want to. Is that true?