Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 如何在wordpress where<;中将_content()拆分并存储到数组中--下一页-->;_Php_Wordpress - Fatal编程技术网

Php 如何在wordpress where<;中将_content()拆分并存储到数组中--下一页-->;

Php 如何在wordpress where<;中将_content()拆分并存储到数组中--下一页-->;,php,wordpress,Php,Wordpress,我想在Wordpress中拆分内容()函数,其中并将其存储到数组中,我试图在不使用插件的情况下实现这一点。而不是使用内容()(将直接在页面上打印内容),您可以使用获取内容(),然后从那里拆分它: $parts = explode('<!--nextpage-->', get_the_content()); $parts=explode(“”,获取内容()); 您可以使用获取内容()然后从中拆分,而不是使用内容()(这将直接在页面上打印内容): $parts = explode('&

我想在Wordpress中拆分
内容()
函数,其中
并将其存储到数组中,我试图在不使用插件的情况下实现这一点。

而不是使用
内容()
(将直接在页面上打印内容),您可以使用
获取内容()
,然后从那里拆分它:

$parts = explode('<!--nextpage-->', get_the_content());
$parts=explode(“”,获取内容());

您可以使用
获取内容()
然后从中拆分,而不是使用
内容()
(这将直接在页面上打印内容):

$parts = explode('<!--nextpage-->', get_the_content());
$parts=explode(“”,获取内容());
只需使用该函数(内容将回显,get_uu函数将不回显)并按如下方式分解它:

$content = get_the_content();
list($page, $nextpage) = explode('<!--nextpage-->', $content);

// or when $content has more than one "<!--nextpage-->"
$pages = explode('<!--nextpage-->', $content);
$content=获取内容();
列表($page,$nextpage)=分解(“”,$content);
//或者当$content有多个“”
$pages=分解(“”,$content);
只需使用该函数(内容将回显,get_uu函数将不回显)并按如下方式分解它:

$content = get_the_content();
list($page, $nextpage) = explode('<!--nextpage-->', $content);

// or when $content has more than one "<!--nextpage-->"
$pages = explode('<!--nextpage-->', $content);
$content=获取内容();
列表($page,$nextpage)=分解(“”,$content);
//或者当$content有多个“”
$pages=分解(“”,$content);

这很优雅-我喜欢。引入注释不会影响任何事情,而且这是一种在编辑器中划分您希望中断发生的位置的简单方法。酷!这是优雅的-我喜欢它。引入注释不会影响任何事情,而且这是一种在编辑器中划分您希望中断发生的位置的简单方法。酷!