[英]preg_grep with html source
我要提取這行
<p>@include{"portal.shared.blook"}</p>
使用
preg_grep("/(\s*@include.*)/",explode("\n", $Source))
從此源代碼
<html>
<head>
<title>hi</title>
</head>
<body>
<h1>Hi I am layout</h1>
<br>
<p>@include{"portal.shared.blook"}</p>
@require{"portal.shared.footer":"[main]"}
有時代碼有空格,我無法處理
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.