How to split session values?
I am getting error like "Notice: Array to string conversion in PHP" in session;
How to solve that?
AntonyRayan
15
Posting Whiz in Training
Recommended Answers
Jump to PostDepends on the structure of the array and the data type, you could use
implode()
to flat the array to a string:$a = ['a' => 123, 'b', TRUE, 'c', NULL, 'd', 'e' => [1,2,3]]; print_r(implode(', ', $a)); # returns 123, b, 1, c, , d, …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.