- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
<?php
$data = file_get_contents('./testt.php');
$repl = array();
//<a href=""><img src="" ></a>
preg_match_all('/[^(?:\<\?.*)]*?[^(?:\<a.*href=.*\>)](?:\<img\s.*)(?:\>)[^(?:\<\/a\>)]*?[^(?:\?\>)]/Umi', $data, $repl);
echo '<pre>';
var_dump($repl);
echo '</pre>';
?>
<html>
<head>
</head>
<body>
<a href="asd">12313</a>
<img src="sadasdasd" alt="dasddasd" /><a href="asd"><img src="sadasdasd" alt="dasddasd" /></a><img src="sadasdasd" alt="dasddasd" /><img src="sadasdasd" alt="dasddasd" />
<img src="sadasdasd" alt="dasddasd" /> <img src="sadasdasd" alt="dasddasd"><br />
<img src="sadasdasd" alt="dasddasd" ><br>
<a href="asd"><img src="sadasdasd" alt="dasddasd"></a><a href="asd"><img src="sadasdasd" alt="dasddasd" ></a><a href="asd">12313</a>
<a href="asd">12313</a>
</body>
</html>
guest 16.06.2009 20:17 # +1
Не асилил...
anonimb84a2f6fd141 25.11.2012 00:15 # 0
guest6 16.09.2023 04:41 # 0
ПИЗДА РУ
ISO 16.09.2023 10:02 # +1