Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJacob Agyemang
1,440 PointsArray to string conversion errors
I get the above error when i write the complex products arrays and try to displaying it in the foreach loop. Do i have to do any casting before displaying?
3 Answers
Dallin Evans
Courses Plus Student 193 PointsHow are you trying to display the array ?
Tom Mertz
15,254 PointsI remember getting this error, too. I don't remember how I fixed it though. It was something dumb, like forgetting to add ?> and close a php statement or something like that. I don't think casting is the solution.
Jacob Agyemang
1,440 PointsIt was was just a weird error. It started working after i started the Apache server. Thank you guys. I really appreciate your prompt response.
Victor Saltanov
2,226 PointsVictor Saltanov
2,226 PointsCould you please copy and paste your code here so we can see what is wrong, would help alot more =].