|
|
|
|
<p>
<em><img src="http://www.footballfancast.com/sites/ffc/files/u812/drogba_didier_cfc_profile_2006.jpg" alt="" width="117" height="150" align="right" />FFC columnist </em><strong>Johnny Smithers</strong><em> continues with his Premiership head to head's and in the 2nd installment of his six part series he looks into the outstanding strikers that grace the Premiership.</em>
</p>
|
Как лучше вырезать картинку - <img... /> ?
<img src="http://www.footballfancast.com/sites/ffc/files/u812/drogba_didier_cfc_profile_2006.jpg" alt="" width="117" height="150" align="right" />
|
Типа отделить... в одну переменную без картинку, в другую саму картинку | |
|
|
|
|
|
|
|
для: ШИМ
(26.12.2007 в 12:02)
| | Если я правильно понял, то можно так:
<?
$text = '<p>
<em><img src="http://www.footballfancast.com/sites/ffc/files/u812/drogba_didier_cfc_profile_2006.jpg" alt="" width="117" height="150" align="right" />FFC columnist </em><strong>Johnny Smithers</strong><em> continues with his Premiership head to head's and in the 2nd installment of his six part series he looks into the outstanding strikers that grace the Premiership.</em>
</p>';
preg_match("/<img .*? \/>/i", $text, $out);
echo "картинка - $out[0]<br>\n";
echo "остальное - " . str_replace($out[0], "", $text);
?>
|
| |
|
|
|
|
|
|
|
для: Drago
(26.12.2007 в 13:51)
| | Ага ПаСиб..
ТебЕ ДраГо НраВится? | |
|
|
|
|
|
|
|
для: ШИМ
(26.12.2007 в 14:30)
| | >ТебЕ ДраГо НраВится?
Если имеется ввиду рэп певец, то нет. Ни разу не слышал его песен.
Мой ник, который я использую уже лет 6, всего лишь случайная трансформация от английского слова Dragon. | |
|
|
|