Whats in the $mybb-> array?
#1
I just started doing a little plugin development today, and I haven't been able to find any docs on whats in the $mybb-> array? (settings, user etc)

Is there a WiKi page describing that, or maybe an easy way to print_r the array?
Reply
#2
<?php

define("IN_MYBB", 1);
require_once "global.php";

echo "<pre>";
print_r($mybb);
echo "</pre>";

?>
Reply
#3
Worked a charm, thanks
Reply
#4
(2012-01-20, 09:23 PM)FlyveHest Wrote: or maybe an easy way to print_r the array?

Is there an easier way to print_r the array than just print_r'ing the array...? Smile
MyReactions - All Plugins

Can you still feel the butterflies?

Free never tasted like pudding.
Reply
#5
This user has been denied support. This user has been denied support.
The print_r output is not html safe, so you might have to look at the page source to see the output properly. Also depending on your style the output might be centered.

I sometimes use this or something similar:

echo '<pre style="text-align: left">'.htmlspecialchars(print_r($var, true)).'</pre>';
Reply
#6
I usually just look at the source. It's nicely formatted there.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)