3 years ago

how to get array count

Posted 3 years ago by Jayanthkumar

i am passing the array from one view to another, there i am retriving data also but i need the array count how to get that count

 public function pass_device_array(Request $request,$id, $enqid){
       $man=explode(',', $id);
        $row = DB::table('device')->whereIn('id',$man)->pluck('id');
        $row1 = DB::table('Enquiry')->where('id',$enqid)->first();
        return view('pages.newinvoice', ['row' => $row, 'row1' => $row1]);


$man is having the list of array....

i need one more variable to hold the count of $id

how to do this

Please sign in or create an account to participate in this conversation.