I’m doing a print_r on a array stored on a session variable and for some unknown reason it’s adding a number after the array prints.
Example:
Array ( [0] => 868 [userid] => 868 ) 1
If I do a print_r directly in the function itself and before the variable gets stored on session variable, it doesn’t add that number 1.
Solution:
Almost at the same time as Paolo answered my question correctly I found the causing code.
A simple echo on print_r
Can you post the code you are using to do this around
print_r? The most common reason for getting a 1 is when you try to print a boolean: