print session variable

by 5 replies
6
I need a little help with how to print this session variable to screen

the password field is the one im trying to echo out.

Array (
Object (
[path] =>
Array (
[0] =>
Array (
[post] =>
Array (
[password] => 123456
)
)
)
)
)
#programming #print #session #variable
  • Is there a particular piece of software you are using or is it custom coded?

    From the code you posted, the password is in an object. You'll need to look through the code to see where the object was instantiated... something like:


    PHP Code:
    myObject = new ObjectName(); 

    Then to view the variables (object properties) you can use syntax like:

    PHP Code:
    echo $ myObject->password
    Depending on the way it's coded, it may not be that simple. But that's the basic paradigm for printing out object properties for troubleshooting. Personally, I use PHPed. It's usually easier to track down bugs that way.

    HTH
    • [1] reply
    • I think this syntax will work
      If it is wrong let me know
      • [1] reply
  • clean output in the screen:

    <pre>
    <?php print_r($myobject->password); ?>
    </pre>
  • or you can use var_dump($myobject->password) as well

Next Topics on Trending Feed