Warning: Illegal offset type (PHP Array)

Author: Zeeshan Arshad     3178     10/18/2011

Estimated reading time: 0 minutes, 6 seconds

Problem: Warning: Illegal offset type when using object into array.
example; $array[] = $variable

Solution: use (string) $variable
example; $array[] = (string) $variable



Was this topic helpful?

Subscribe YouTube Channel

Zeeshan Arshad is a self-taught and multi-dimensional person with extraordinary track record of success with international clients and students.

Feel free to contact him for your project, training purpose or guidance.