title: PHP Parsing json decoded result from wikipedia api MediaWiki
body: <p>I am trying to use the wikipedia mediawiki api to get a page data. The query url is :</p>
  
  <p><a href="http://en.wikipedia.org/w/api.php?action=parse&amp;format=json&amp;page=Nirnayam_%281991_film%29" rel="nofollow">http://en.wikipedia.org/w/api.php?action=parse&amp;format=json&amp;page=Nirnayam_%281991_film%29</a></p>
  
  <p>One of the properties returned is categories:</p>
  
  <pre><code>"categories":[{"sortkey":"","*":"Telugu-language_films"},{"sortkey":"","*":"1991_films"},{"sortkey":"","*":"Indian_films"}]
  </code></pre>
  
  <p>A var_dump after json_decode  :</p>
  
  <pre><code>foreach($wiki_page_data_json-&gt;parse-&gt;categories as $cat)
  {
      var_dump($cat);
  }
  </code></pre>
  
  <p>gives me this :</p>
  
  <blockquote>
    <p>object(stdClass)[21]   public 'sortkey' => string '' (length=0)<br>
    public '*' => string 'Telugu-language_films' (length=21)</p>
    
    <p>object(stdClass)[22]   public 'sortkey' => string '' (length=0)<br>
    public '*' => string '1991_films' (length=10)</p>
    
    <p>object(stdClass)[23]   public 'sortkey' => string '' (length=0)<br>
    public '*' => string 'Indian_films' (length=12)</p>
  </blockquote>
  
  <p>I can access public 'sortkey' as <strong>$cat->sortkey</strong> </p>
  
  <p>Question is - <strong>How do I access the value in public '*' ?</strong></p>