<?php
$somevariable = echo $anothervar;
?>
Run Code Online (Sandbox Code Playgroud)
我收到T_ECHO意外错误.完成上述任务的正确方法是什么?
我正在扩展这个问题:
<?php
$num_posts = get_option($shortname.'_num_posts');
$args = array(
'posts_per_page' => $num_posts,
'post_type' => 'post'
);
?>
Run Code Online (Sandbox Code Playgroud)
这是一些wordpress代码.*get_option*函数不回显值,所以我试过了
<?php
$num_posts = echo get_option($shortname.'_num_posts');
$args = array(
'posts_per_page' => $num_posts,
'post_type' => 'post'
);
?>
Run Code Online (Sandbox Code Playgroud)
我搞砸了 什么是正确的方法呢?