I have several rows in a table that have 5 fields that are populated with strings. pic1, pic2, pic3, pic4, pic5
I want to read each of the fields mentioned from the each row, implode into and array with comma separator and write it back to a different field in the same row it came from. It's not working like it should
`
$Link = mysqli_connect ($Host, $User, $Password, $DBName);
$query = 'SELECT pic1,pic2,pic3,pic4,pic5 FROM tbl_reports';
$Result = mysqli_query ($Link, $query);
while ($row = mysqli_fetch_array($Result))
{
$array = array();
$array = array($row);
$array1 = implode(',', $array[0]);
$query1 ="UPDATE tbl_reports SET pics = '$array1'";
$Result1 = mysqli_query ($Link, $query1);
}`