tags:

views:

53

answers:

5

I tryed to email me debug_backtrace() but it just prints out the array. I need to assign it to a variable so that var_export can work with it. How can i do that?

A: 

????

$var = debug_backtrace()
stereofrog
+1  A: 

debug_backtrace returns the array, but doesn't print it. There's probably something wrong with the code that handles the emailing of the report. Could you paste that piece of code here as well?

WordPress Hardcore
+1  A: 

Send the following $msg :

$msg=print_r(debug_backtrace(),true));

Not tested, but that's one way.

zaf
+1  A: 

There is a function that "prints out the array", debug_print_backtrace. You didn't mix those two up by any chance?
And both var_export() and print_r() by default print the result. You have to pass true as the second parameter if you want them to return the result (so you can assign it to a variable)

$result = var_export(debug_backtrace(), true);
VolkerK
A: 

read the manual...:D

Quamis