"Array to string conversion" in PHP — What It Means and How to Fix It
What the PHP error "Array to string conversion" means and how to fix it.
Published November 1, 2026
"Array to string conversion" occurs when an array is used in a context expecting a string, like inside echo or string concatenation.
Key points
- PHP converts the array to the literal string "Array" and emits this notice — use print_r() or json_encode() to actually display array contents