How to Show variables

I used this function to output all the variables on my page

<?php var_dump(get_defined_vars()); ?>

I got a bunch of code strings eg:
[“post_excerpt”]

I have tried to output these values like this:

<?php echo $post_excerpt; ?>

but they don’t show.

I am really just trying to find out what variables are available to me to use. I have plugins that are showing information on the page so I imagine there are quite a few I can use.

How do I show what variables are available to me cleanly? Thanks

It looks like you’re trying to do some wordpress hacking. If that’s the case, and without knowing more, it could be that you’re not doing the echo’ing inside the loop.

That being said, can you offer more details about what your issue is?

If you are within a function, you may need to use the global declaration to access them.

The get_defined_vars page has some code from one of the comment posters to find out all the variables in current scope and their values

Yes it is wordpress “hacking” I am trying to find out what variables are available as I want to output the comments total for the posts.
I am just looking for some simple code that does the same as the colfusion function cfdump. As far as echoing how do I loop throught htis variable?

<?php echo $post_excerpt; ?>
is that not correct? Thank you

That is where reading the documentation becomes useful.
For example: Function Reference/wp count posts

If there’s anything that you can’t find, then the Wordpress Forums are the place to get more info about Wordpress.

Thanks Paul appreciated!