The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
I just found this little snippet of code that works great for replacing print_r when working with code, and thought I would share it here. It prints out like this:
Code:
Array
(
[0] => 5
[1] => 6
[2] => 7
)
Here is the code: PHP Code:
@usage: PHP Code:
NOTE: The optional 2nd parameter can be set to "true", so the html-code is returned. I haven't quite figured out what the 2nd perimeter actually does as no code has shown up for me when that has been enabled. |
|
#2
|
||||
|
||||
|
var_dump() / var_export() ?
Why re-invent the wheel? |
|
#3
|
||||
|
||||
|
That does not format it so it is easily readable.
If you don't like it, don't use it. Keep the sarcastic comments to yourself. |
|
#4
|
||||
|
||||
|
Dude, what is wrong with you!?
Just trying to help, sorry :/ |
|
#5
|
||||
|
||||
|
I just woke up and that post was the first thing I saw. Maybe I read it wrong, If so, I apologize.
But, var_dump or var_export shows it all in one line. The pre tags format it so it is easier to view. I had been using var_dump until I found this. |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|