pass special characters to postgres

Hi

I want to pass array as parameter to postgres. I use button per record and add id to string

And try to do
sc_lookoop(x,“select proc(’{”.$arr."’}’)")

when ie
$arr=’ 123, 124 ’

but SC think that {} is variable.
postgres get
select proc(’$"_"’)

I want to execute
select proc(’{ 123, 124 }’)

I try add \ before special characters but i didn’t help

How I can pass {} as text?