laural Posted January 18, 2013 Share Posted January 18, 2013 I have a forum that is included on my site via SSI. There is a function provided that allows me to pull in the Member name (based on a member id) - and I can print the array of profile information. I need to format and display this information and I don't know how to do that... can anyone point me in the right direction? BTW, I cannot add anything to the function... Thank you! Array ( [13] => Array ( [username] => laural [name] => laural [id] => 13 [is_buddy] => [is_reverse_buddy] => [buddies] => Array ( ) [title] => [href] => http://www.powerflexweb.com/pwf/forum/index.php?action=profile;u=13 [link] => laural [email] => [email protected] [show_email] => no [registered] => January 16, 2013, 02:14:18 pm [registered_timestamp] => 1358363658 [blurb] => [gender] => Array ( [name] => [image] => ) [website] => Array ( [title] => [url] => ) [birth_date] => 0000-00-00 [signature] => [location] => [icq] => Array ( [name] => [add] => [href] => [link] => [link_text] => ) [aim] => Array ( [name] => [href] => [link] => [link_text] => ) [yim] => Array ( [name] => [href] => [link] => [link_text] => ) [msn] => Array ( [name] => [href] => [link] => [link_text] => ) [real_posts] => 0 [posts] => 0 [avatar] => Array ( [name] => [image] => [href] => [url] => ) [last_login] => January 16, 2013, 02:39:08 pm [last_login_timestamp] => 1358365148 [karma] => Array ( [good] => 0 [bad] => 0 [allow] => ) [ip] => 173.95.174.124 [ip2] => 173.95.174.124 [online] => Array ( [is_online] => [text] => Offline [href] => http://www.powerflexweb.com/pwf/forum/index.php?action=pm;sa=send;u=13 [link] => Offline [image_href] => http://www.powerflexweb.com/pwf/forum/Themes/pwf/images/useroff.gif [label] => Offline ) [language] => [is_activated] => 1 [is_banned] => [options] => Array ( [display_quick_reply] => 1 ) [is_guest] => [group] => [group_color] => [group_id] => 0 [post_group] => Newbie [post_group_color] => [group_stars] => * [warning] => 0 [warning_status] => [local_time] => January 18, 2013, 07:11:39 am [has_messenger] => ) ) Link to comment https://forums.phpfreaks.com/topic/273312-how-to-style-php-function-array/ Share on other sites More sharing options...
kicken Posted January 18, 2013 Share Posted January 18, 2013 There is no way you're going to format PHP's print_r output into something presentable to an end-user using css. print_r is for debugging use only. You need to be able to use PHP to get the information and format it that way. Link to comment https://forums.phpfreaks.com/topic/273312-how-to-style-php-function-array/#findComment-1406685 Share on other sites More sharing options...
laural Posted January 18, 2013 Author Share Posted January 18, 2013 I had a bad feeling that would be the answer Thanks, I appreciate the confirmation! Link to comment https://forums.phpfreaks.com/topic/273312-how-to-style-php-function-array/#findComment-1406716 Share on other sites More sharing options...
Jessica Posted January 18, 2013 Share Posted January 18, 2013 Does the function return an array which you then put into print_r or does the function actually call print_r? Link to comment https://forums.phpfreaks.com/topic/273312-how-to-style-php-function-array/#findComment-1406741 Share on other sites More sharing options...
laural Posted January 18, 2013 Author Share Posted January 18, 2013 Jessica, The function does return an array - I put it in print_r to "see" the array... anything I can do to format? Link to comment https://forums.phpfreaks.com/topic/273312-how-to-style-php-function-array/#findComment-1406778 Share on other sites More sharing options...
Jessica Posted January 18, 2013 Share Posted January 18, 2013 Yes. Stop using print_r. Figure out how you want it to look. Link to comment https://forums.phpfreaks.com/topic/273312-how-to-style-php-function-array/#findComment-1406779 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.