<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Code Program &#187; PHP</title>
	<atom:link href="http://www.codeprogram.net/technology/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codeprogram.net</link>
	<description>we code web layouts</description>
	<lastBuildDate>Fri, 15 Apr 2011 12:01:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Regular Expression Search in Dreamweaver</title>
		<link>http://www.codeprogram.net/regular-expression-search-in-dreamweaver.html</link>
		<comments>http://www.codeprogram.net/regular-expression-search-in-dreamweaver.html#comments</comments>
		<pubDate>Thu, 27 Aug 2009 13:23:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Designing]]></category>
		<category><![CDATA[dreamweaver]]></category>
		<category><![CDATA[wild characters]]></category>

		<guid isPermaLink="false">http://www.codeprogram.net/?p=32</guid>
		<description><![CDATA[During working on any static site or existing site a lot of times we face a problem that there should be search using wild characters or regular expressions. For example I have a site at my local where a lot of links: &#60;a href=&#8221;../category/article-title-keyword1.html&#8221;&#62; We need to search all links which are in this category [...]]]></description>
			<content:encoded><![CDATA[<p>During working on any static site or existing site a lot of times we face a problem that there should be search using wild characters or regular expressions.</p>
<p>For example I have a site at my local where a lot of links:</p>
<p>&lt;a href=&#8221;../category/article-title-keyword1.html&#8221;&gt;</p>
<p>We need to search all links which are in this category and need to change them in category2.</p>
<p>We usually does that manually i.e. we search /category/ and replace it with /category2/.</p>
<p>There is also another good method using regular expression.</p>
<p>In search box put in find box:</p>
<p>href=&#8221;../category/([^&lt;]*)&#8221;&gt;</p>
<p>and in replace box put:</p>
<p>href=&#8221;../category2/$1&#8243;&gt;</p>
<p>Check box of &#8220;Use Regular Expressions&#8221; should be checked.</p>
<p>If you want to change in whole site than select that option. We prefer to check first in current page so that you can undo if there is something going wrong.</p>
<p><a href="http://www.codeprogram.net/wp-content/uploads/2009/08/dreamweaver-regular-express.png"><img class="size-full wp-image-33 alignnone" title="dreamweaver-regular-express" src="http://www.codeprogram.net/wp-content/uploads/2009/08/dreamweaver-regular-express.png" alt="dreamweaver-regular-express" width="448" height="191" /></a></p>
<p>Explanation: ([^&lt;]*) is like a variable. You can use more variables but you should separate them properly in search query. We can put variable value in replace box with $1, $2 etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codeprogram.net/regular-expression-search-in-dreamweaver.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove extra Tags from Database Records</title>
		<link>http://www.codeprogram.net/remove-extra-tags-from-database-records.html</link>
		<comments>http://www.codeprogram.net/remove-extra-tags-from-database-records.html#comments</comments>
		<pubDate>Thu, 19 Mar 2009 06:11:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.codeprogram.net/?p=9</guid>
		<description><![CDATA[In my database I have many records in which there are html tags and html comments. When I pick description of that data I sometimes got broken html tags as I pick limited characters from that record. I tried strip_tags function and get rid of problem up to some extent. &#60;?php $text = '&#60;p&#62;Test content [...]]]></description>
			<content:encoded><![CDATA[<p>In my database I have many records in which there are html tags and html comments. When I pick description of that data I sometimes got broken html tags as I pick limited characters from that record.</p>
<p>I tried strip_tags function and get rid of problem up to some extent.</p>
<p><code>&lt;?php</p>
<p>$text = '&lt;p&gt;Test content will go here.&lt;/p&gt;&lt;!-- Comment --&gt; &lt;a href="#"&gt;Other text&lt;/a&gt;';</p>
<p>echo strip_tags($text);</p>
<p>//output will be "Test content will go here. Other text"</p>
<p>// and to Allow &lt;p&gt; and &lt;a&gt;</p>
<p>echo strip_tags($text, '&lt;p&gt;&lt;a&gt;');</p>
<p>//output will be "&lt;p&gt;Test content will go here.&lt;/p&gt; &lt;a href="#"&gt;Other text&lt;/a&gt;"</p>
<p>?&gt;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.codeprogram.net/remove-extra-tags-from-database-records.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

