This way you make $data an array where every entry is a seperate part of your comment logic. You have an entry with all the usernames, and one with all the imgs. But instead you want an array where every entry is a seperate comment, with its own username and img.
So instead of doing:
$data[img][] = 'img location'; $data[username][] = 'username';
You need to do
$entry = array(); $entry[img] = 'img location'; $entry[username] = 'username'; $data[] = $entry;
I hope this makes sense to you.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community