Benbob
Benbob

Reputation: 14264

Convert postgres bytea string into php byte string

I have a string like \314\002\012\001 which I need to convert into a base64 encoded byte string.

Upvotes: 0

Views: 3403

Answers (1)

Tom Shaw
Tom Shaw

Reputation: 660

You should be able to use the built-in php function pg_unescape_bytea. There is an example on that page.

Upvotes: 2

Related Questions