Why do 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/21
23:13 UTC
Read the original article
Hit count: 164
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