Update Postgres table with array elements
I want update the Postgres database table with array elements but I didn't know how.

I tried this but I got this notice: Notice: Undefined index: 'value' in 'file' on line x

   

     pg_query($connect, "UPDATE tabe SET row = {$vars[$first]}  WHERE code = {$vars[$code]} ");
    
    pg_query($connect, "UPDATE tabe SET row = '{$vars[$first]}'  WHERE code = '{$vars[$code]}' ");
Update Postgres table with array elements
===

I want update the Postgres database table with array elements but I didn't know how.

I tried this but I got this notice: Notice: Undefined index: 'value' in 'file' on line x

   

     pg_query($connect, "UPDATE tabe SET row = {$vars[$first]}  WHERE code = {$vars[$code]} ");
    
    pg_query($connect, "UPDATE tabe SET row = '{$vars[$first]}'  WHERE code = '{$vars[$code]}' ");