刪除內容我從包含如何從頁面在PHP
<?xml version="1.0" encoding="UTF-8"?>
<ipinfo xmlns="http://data.quova.com/1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
我想刪除這個頭 因此需要幫助該怎麼做了捲曲的一頁。
我試過str_replace函數的功能,但沒有成功
$find1='/<?xml version="1.0" encoding="UTF-8"?>/';
$find2='/<ipinfo xmlns="http://data.quova.com/1" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">/';
$contentx = str_replace($find1, '', $data,$count);
無需在'str_replace'分隔符,它不是一個正則表達式功能 – 2012-03-22 20:00:58
爲什麼你'/'的前/後前引號? – 2012-03-22 20:01:44
如果刪除了正則表達式分隔符,'str_replace()'應該成功。 – 2012-03-22 20:01:51