【发布时间】:2020-06-07 00:02:59
【问题描述】:
我必须使用 preg_replace_callback 函数而不是 preg_match_all 函数,但是我对这个问题的研究没有产生任何结果。请你能帮我解决下面的代码吗?
$content_post = get_post($id);
$content = $content_post->post_content;
$html_content = wpautop( $content );
preg_match_all('#<!--part_name:(.*?)-->#Ssie',$html_content,$PartCount);
preg_match_all('#<!--part_name:.*?-->(.*?)<!--nextpage-->#Ssie',$html_content,$PartEmbed);
【问题讨论】: