<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Форум PHP-MyAdmin.RU &mdash; Вывести с поля только картинку]]></title>
	<link rel="self" href="https://forum.php-myadmin.ru/extern.php?action=feed&amp;tid=1644&amp;type=atom" />
	<updated>2010-03-31T19:08:46Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.php-myadmin.ru/viewtopic.php?id=1644</id>
		<entry>
			<title type="html"><![CDATA[Re: Вывести с поля только картинку]]></title>
			<link rel="alternate" href="https://forum.php-myadmin.ru/viewtopic.php?pid=11440#p11440" />
			<content type="html"><![CDATA[<p><strong>vanicon</strong><br />Попробуйте к тексту применить функцию удаляющую html теги strip_tags().<br />[mono]echo strip_tags($row[&quot;post_content&quot;]);[/mono]</p>]]></content>
			<author>
				<name><![CDATA[Hanut]]></name>
				<uri>https://forum.php-myadmin.ru/profile.php?id=181</uri>
			</author>
			<updated>2010-03-31T19:08:46Z</updated>
			<id>https://forum.php-myadmin.ru/viewtopic.php?pid=11440#p11440</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Вывести с поля только картинку]]></title>
			<link rel="alternate" href="https://forum.php-myadmin.ru/viewtopic.php?pid=11435#p11435" />
			<content type="html"><![CDATA[<p>А можно ли вывести не URl картинки, а только текст записи из поля post_content, с помощью функции preg_match()</p>]]></content>
			<author>
				<name><![CDATA[vanicon]]></name>
				<uri>https://forum.php-myadmin.ru/profile.php?id=2280</uri>
			</author>
			<updated>2010-03-31T18:16:43Z</updated>
			<id>https://forum.php-myadmin.ru/viewtopic.php?pid=11435#p11435</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Вывести с поля только картинку]]></title>
			<link rel="alternate" href="https://forum.php-myadmin.ru/viewtopic.php?pid=11399#p11399" />
			<content type="html"><![CDATA[<p>Спасибо, теперь можно вывести только картинку.</p>]]></content>
			<author>
				<name><![CDATA[vanicon]]></name>
				<uri>https://forum.php-myadmin.ru/profile.php?id=2280</uri>
			</author>
			<updated>2010-03-30T20:20:04Z</updated>
			<id>https://forum.php-myadmin.ru/viewtopic.php?pid=11399#p11399</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Вывести с поля только картинку]]></title>
			<link rel="alternate" href="https://forum.php-myadmin.ru/viewtopic.php?pid=11398#p11398" />
			<content type="html"><![CDATA[<p><strong>vanicon</strong><br />Если нужна только ссылка на картинку, то найти в тексте ее можно так:<br /></p><div class="codebox"><pre><code>&lt;?php
preg_match(&#039;/src\=&quot;(.+?)&quot;/i&#039;, $row[&quot;post_content&quot;], $matches);
echo $matches[1];
?&gt;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Hanut]]></name>
				<uri>https://forum.php-myadmin.ru/profile.php?id=181</uri>
			</author>
			<updated>2010-03-30T19:39:10Z</updated>
			<id>https://forum.php-myadmin.ru/viewtopic.php?pid=11398#p11398</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Вывести с поля только картинку]]></title>
			<link rel="alternate" href="https://forum.php-myadmin.ru/viewtopic.php?pid=11396#p11396" />
			<content type="html"><![CDATA[<p>Вот содержимое поля post_content:<br />&lt;a href=&quot;uploads/2010/03/ivolga.jpg&quot;&gt;&lt;img class=&quot;alignleft size-full wp-image-1448&quot; title=&quot;ivolga&quot; src=&quot;uploads/2010/03/ivolga.jpg&quot; alt=&quot;ivolga&quot; width=&quot;150&quot; height=&quot;150&quot; /&gt;&lt;/a&gt;Текст статьи</p>]]></content>
			<author>
				<name><![CDATA[vanicon]]></name>
				<uri>https://forum.php-myadmin.ru/profile.php?id=2280</uri>
			</author>
			<updated>2010-03-30T18:20:08Z</updated>
			<id>https://forum.php-myadmin.ru/viewtopic.php?pid=11396#p11396</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Вывести с поля только картинку]]></title>
			<link rel="alternate" href="https://forum.php-myadmin.ru/viewtopic.php?pid=11387#p11387" />
			<content type="html"><![CDATA[<p><strong>vanicon</strong><br />В каком виде картинка хранится внутри текста?</p>]]></content>
			<author>
				<name><![CDATA[Hanut]]></name>
				<uri>https://forum.php-myadmin.ru/profile.php?id=181</uri>
			</author>
			<updated>2010-03-30T14:10:19Z</updated>
			<id>https://forum.php-myadmin.ru/viewtopic.php?pid=11387#p11387</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Вывести с поля только картинку]]></title>
			<link rel="alternate" href="https://forum.php-myadmin.ru/viewtopic.php?pid=11385#p11385" />
			<content type="html"><![CDATA[<p>Выбираю из таблицы wp_post и из нее поле post_content, в поле post_content содержится текст и картинка, и мне нужно выбрать только картинку с этого поля.<br />Вот запрос:<br />&lt;?php<br />$DB = &quot;wp-ivan&quot;; #название базы данных<br />mysql_select_DB($DB) or die(&quot;Ошибка подключения к базе данных...&quot;.mysql_error());<br />$result = mysql_query(&quot;SELECT&nbsp; &nbsp;post_content FROM wp_posts WHERE post_status = &#039;publish&#039; AND post_type = &#039;post&#039; LIMIT 1&quot;);<br />while ($row = mysql_fetch_array($result, MYSQL_BOTH)) {<br />&nbsp; &nbsp; &nbsp; &nbsp; $postPrint = $row[&quot;post_content&quot;];<br />&nbsp; &nbsp; &nbsp; &nbsp; $postStr = substr($postPrint,0,802);<br />&nbsp; &nbsp; &nbsp; &nbsp; echo &quot;$postStr&quot;;<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; mysql_free_result($result);<br />?&gt;</p><p>Подскажите как сделать такой запрос.</p>]]></content>
			<author>
				<name><![CDATA[vanicon]]></name>
				<uri>https://forum.php-myadmin.ru/profile.php?id=2280</uri>
			</author>
			<updated>2010-03-30T11:27:03Z</updated>
			<id>https://forum.php-myadmin.ru/viewtopic.php?pid=11385#p11385</id>
		</entry>
</feed>
