Jump to content

Archived

This topic is now archived and is closed to further replies.

lildog

basic php variable question

Recommended Posts

Hello,

I believe this is a basic question, I just don't know how to do it. How do I echo OR print a variable that is an object? Like an array I can print_r()....

 

thanks alot,

lildog

Share this post


Link to post
Share on other sites

Something like this:

 

<?php

 for ( $i = 0; $i < count( $array ); $i++ ) {
echo $array[$i] . '<br>';
 }

?>

The HTML in the echo statement is optional.

 

You may want to use a space there ( like ' ' ) instead.

 

Did you happen to see my reply to your post about reading an XML file from a URL?

:unsure:


If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Share this post


Link to post
Share on other sites

×