Title: PHP syntax question
Last modified: August 19, 2016

---

# PHP syntax question

 *  [rightworks](https://wordpress.org/support/users/rightworks/)
 * (@rightworks)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/php-syntax-question/)
 * In this statement:
 * $wp_query->post_count
 * what is the arrow doing?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Clayton James](https://wordpress.org/support/users/claytonjames/)
 * (@claytonjames)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/php-syntax-question/#post-1258953)
 * I’m going to take a W.A.G. at this one, so don’t laugh at me. Okay, you can laugh
   if you want to. I will state it in the form of a question for anyone who knows
   the correct answer… (’cause I don’t really know either). 😛
 * Doesn’t “->” simply indicate that “post_count” is to be the object property or
   variable shown by $wp_query? Am I even close, or is there more to it than that?
 *  [mtw28](https://wordpress.org/support/users/mtw28/)
 * (@mtw28)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/php-syntax-question/#post-1258957)
 * Hi, that’s pretty much it, the arrow there is referencing a method or property
   of a defined php class, in this case the $wp_query object. In this usage it’s
   a bit like getting the value of an array. Read more about [$wp_query properties here](http://codex.wordpress.org/Function_Reference/WP_Query).
 * More reading classes in the [php manual here](http://www.php.net/manual/en/language.oop5.basic.php).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP syntax question’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [mtw28](https://wordpress.org/support/users/mtw28/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/php-syntax-question/#post-1258957)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
