vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   print_r() question (https://vborg.vbsupport.ru/showthread.php?t=93742)

Logikos 08-06-2005 03:55 PM

print_r() question
 
PHP Code:

print "<pre>";
print_r($rss_array);
print 
"</pre>"

The output of that is;
Code:

Array
(
    [items] => Array
        (
            [0] => Array
                (
                    [title] => Users online gets messed up with weird names
                    [link] => http://www.vbulletin.com/forum/bugs3...view&bugid=907
                    [description] => Type: Unknown/General
Status: Confirmed
Last Post By: Freddie Bingham
                )

            [1] => Array
                (
                    [title] =>  tag bug
                    [link] => http://www.vbulletin.com/forum/bugs3...view&bugid=917
                    [description] => Type: Unknown/General
Status: Confirmed
Last Post By: ShytK
                )

        )

    [channel] => Array
        (
            [title] => vBulletin 3.5 Bug Tracker
        )

)

Now what variable holds the information to show the title and description? I've read the PHP manual and they say;

PHP Code:

$b = array ('m' => 'monkey''foo' => 'bar''x' => array ('x''y''z'));
$results print_r($btrue); //$results now contains output from print_r 

But I don't quite get it. Any help? Thanks!

Andreas 08-06-2005 03:58 PM

PHP Code:

foreach ($rss_array['items'] AS $item)
{
echo 
"Title: $item[title], Description: $item[description]<br />";



Logikos 08-06-2005 04:09 PM

[high]* Logikos bows down to Kirby :)
[/high]

Thank you my friend.

filburt1 08-06-2005 09:18 PM

From the snippet you posted, the manual likely is suggesting output buffering through the functions ob_start(), ob_get_contents(), and ob_end_clean().


All times are GMT. The time now is 03:49 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01887 seconds
  • Memory Usage 1,721KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete