Customizing SMF > SMF Coding Discussion

Help getting Users Group

<< < (2/3) > >>

NIAB:
Could you please explain a little more. the print_r doesnt seem to work for me.

NIAB:
Heres an example of what I have in mind


--- Code: ---$image['background'] =  array (
            1 => 'http://www.site link.com/folder/the_background.gif'
        );
 
echo '
<div class="poster" ';

if(in_array(1, $message['member']['group'])){
echo'
style=" background-image:url("' , $image['background'], '");"';
};
echo '>';
--- End code ---

Keep in mind that I am still somewhat 'new' to PHP and such

Suki:
how do you exactly are using the print_r() function?

NIAB:
Had it at the bottom of my footer


--- Code: ---<?php echo '<pre>', print_r($GLOBALS), '</pre>'; ?>
--- End code ---

Suki:
Put it next to the avatar code I put above and don't use $globals,  use $message['member'] just like I wrote it above.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version