【发布时间】:2011-01-15 07:31:33
【问题描述】:
我有这个功能:
<?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 .'\'');
但它不起作用。这样做的正确方法是什么?
【问题讨论】: