我有这个功能:
<?php
function getmypost($number)
{
query_posts('p=1828');
while (have_posts()) : the_post();
the_title('<h1>', '</h1>');
the_content();
endwhile;
}
?>
我需要将 1828 作为变量我已经尝试过:
query_posts('\'p='. $number .'\'');
但它不起作用。这样做的正确方法是什么?