Why don't these two wordpress php blocks work out the same?

Posted by Matrym on Stack Overflow See other posts from Stack Overflow or by Matrym
Published on 2010-04-21T23:06:14Z Indexed on 2010/04/22 0:23 UTC
Read the original article Hit count: 256

Filed under:
|

This first bit works:

                $my_id = 617;
                $post_id_7 = get_post($my_id); 
                $title = $post_id_7->post_excerpt;
                echo $title;

While this second bit doesn't:

                $post_id_7 = get_post(617); 
                $title = $post_id_7->post_excerpt;
                echo $title;

What gives?

© Stack Overflow or respective owner

Related posts about php

Related posts about Wordpress