<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6925309688585982497</id><updated>2011-11-27T15:53:00.567-08:00</updated><category term='Zend Framework'/><category term='PHP'/><category term='Regex'/><category term='htaccess'/><category term='Joomla'/><category term='SQL'/><category term='General Tips'/><category term='CentOS'/><title type='text'>Developer Tips</title><subtitle type='html'>sharing some useful programming tips with other developers.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>35</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-1675999957053020895</id><published>2011-08-31T15:10:00.000-07:00</published><updated>2011-08-31T15:14:10.652-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Zend Framework'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Zend Db Select with like</title><content type='html'>Like keyword can be used with Zend_Db select query&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;$query = $this-&gt;select()&lt;br /&gt;           -&gt;where("firstname like ?", $letter."%");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;try that works.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-1675999957053020895?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/1675999957053020895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=1675999957053020895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/1675999957053020895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/1675999957053020895'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2011/08/zend-db-select-with-like.html' title='Zend Db Select with like'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-621361821790115198</id><published>2011-08-17T18:30:00.000-07:00</published><updated>2011-08-17T18:35:56.501-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL to select comma separated data from table</title><content type='html'>There is a way to select comma separated data from any mysql table.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SELECT poll_id,group_concat(option_id) FROM `poll_elements` &lt;br /&gt;group by poll_id&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;this will output as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;poll_id | group_concat(option_id)&lt;br /&gt;1 | 3855,5098,8474&lt;br /&gt;3 | 3855,9469,15677&lt;br /&gt;6 | 509,3855,9469,10489&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-621361821790115198?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/621361821790115198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=621361821790115198' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/621361821790115198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/621361821790115198'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2011/08/sql-to-select-comma-separated-data-from.html' title='SQL to select comma separated data from table'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-4085112032031014735</id><published>2011-06-24T16:33:00.000-07:00</published><updated>2011-06-24T16:38:18.241-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Zend Framework'/><title type='text'>Zend Form - Adding a hidden field without decorators</title><content type='html'>If the hidden field added to the Zend form leaves extra space between elements, remove those tags around it.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;&lt;br /&gt;$this-&gt;addElement("hidden", "id", &lt;br /&gt;                   array('disableLoadDefaultDecorators' =&gt; true));&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That will do it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-4085112032031014735?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/4085112032031014735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=4085112032031014735' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/4085112032031014735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/4085112032031014735'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2011/06/zend-form-adding-hidden-field-without.html' title='Zend Form - Adding a hidden field without decorators'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-7625960289174586520</id><published>2011-06-21T15:17:00.000-07:00</published><updated>2011-06-21T15:22:37.999-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Select records from tables of different databases</title><content type='html'>This is the way to select records from tables of different databases&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;SELECT * FROM `db`.table tb&lt;br /&gt;INNER JOIN `db2`.table2 tb2 ON tb2.id = tb.id&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;hope it helps someone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-7625960289174586520?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/7625960289174586520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=7625960289174586520' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/7625960289174586520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/7625960289174586520'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2011/06/select-records-from-tables-of-different.html' title='Select records from tables of different databases'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-5285247863210999005</id><published>2011-06-19T07:35:00.000-07:00</published><updated>2011-06-19T08:15:05.420-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Zend Framework'/><title type='text'>Zend Form - Adding Custom Error Messges to element</title><content type='html'>Custom error messages can be added to a form element:&lt;br /&gt;&lt;br /&gt;The following shows how to add custom error message to a select element&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;$countryList = array("0" =&gt; "select" ,"1" =&gt; "Canada", "2" =&gt; "India", "3" =&gt; "America");&lt;br /&gt;$countries = new Zend_Form_Element_Select('country');&lt;br /&gt;$countries-&gt;setLabel("Country")&lt;br /&gt;     -&gt;setRequired(true)&lt;br /&gt;     -&gt;addFilter('Int')     &lt;br /&gt;     -&gt;addMultiOptions($countryList)&lt;br /&gt;     -&gt;addValidator('GreaterThan',false, array("min"=&gt;1, "messages" =&gt; array("notGreaterThan"=&gt;"country is required")));&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;validator name = GreaterThan&lt;br /&gt;message for = notGreaterThan ( get it from validator library file or api doc)&lt;br /&gt;&lt;br /&gt;The customr error message will display now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-5285247863210999005?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/5285247863210999005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=5285247863210999005' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/5285247863210999005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/5285247863210999005'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2011/06/adding-custom-error-messges-to-zend.html' title='Zend Form - Adding Custom Error Messges to element'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-4595710042343157832</id><published>2011-03-12T00:54:00.000-08:00</published><updated>2011-03-12T00:59:04.756-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Merging two arrays without changing numeric keys</title><content type='html'>Merge two arrays together using array_merge function&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;&lt;br /&gt;$result = array_merge(array(0=&gt;"Hello"), array(3=&gt;"World"));&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The result will have an array with keys got re-numbered&lt;br /&gt;therefore the key 3 will be changed to 1.&lt;br /&gt;&lt;br /&gt;If you want to keep your array keys unchanged&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;&lt;br /&gt;$result = $arr1 + $arr2;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That will do it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-4595710042343157832?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/4595710042343157832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=4595710042343157832' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/4595710042343157832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/4595710042343157832'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2011/03/merging-two-arrays-without-changing.html' title='Merging two arrays without changing numeric keys'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-254141179820561278</id><published>2011-02-18T05:13:00.000-08:00</published><updated>2011-02-18T05:15:35.930-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Zend Framework'/><title type='text'>Zend Form - make a text field read only</title><content type='html'>A text element of a form can be made read only therefore user cannot touch the value&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;&lt;br /&gt;$this-&gt;addElement('text','current_date',array(            &lt;br /&gt;            'attribs' =&gt; array('readonly' =&gt; 'true')));&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;that will do it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-254141179820561278?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/254141179820561278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=254141179820561278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/254141179820561278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/254141179820561278'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2011/02/zend-form-make-text-field-read-only.html' title='Zend Form - make a text field read only'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-5049840892879848379</id><published>2011-02-18T05:07:00.000-08:00</published><updated>2011-02-18T05:11:45.976-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Zend Framework'/><title type='text'>Zend Framework - Fetch rows in key value pair</title><content type='html'>If you happened to select records in key value pair, try this way&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;&lt;br /&gt;$query = $this-&gt;select()&lt;br /&gt;-&gt;from($this-&gt;_name, array('id', 'name'));&lt;br /&gt;&lt;br /&gt;$this-&gt;getAdapter()-&gt;fetchPairs($query);&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;that will return &lt;br /&gt;222 =&gt; "Velvom"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-5049840892879848379?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/5049840892879848379/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=5049840892879848379' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/5049840892879848379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/5049840892879848379'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2011/02/zend-framework-fetch-rows-in-key-value.html' title='Zend Framework - Fetch rows in key value pair'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-2401772213586760324</id><published>2011-02-09T17:08:00.001-08:00</published><updated>2011-02-09T17:11:06.150-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>MySQL Update on Same Table</title><content type='html'>If any chance to do an UPDATE on the same table, here is the SQL for that&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;&lt;br /&gt;UPDATE my_list AS a &lt;br /&gt;INNER JOIN my_list AS b &lt;br /&gt;ON a.id = b.id &lt;br /&gt;SET a.list_name_val = md5( b.list_name )&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;the above SQL will update list_name_val column with md5 of list_name.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-2401772213586760324?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/2401772213586760324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=2401772213586760324' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/2401772213586760324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/2401772213586760324'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2011/02/mysql-update-on-same-table.html' title='MySQL Update on Same Table'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-8686923796355694519</id><published>2010-11-01T18:44:00.000-07:00</published><updated>2010-11-01T18:52:50.919-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Joomla'/><title type='text'>Let User Selects Language in Joomla 1.5</title><content type='html'>If you'd like to let visitors select their language on your site, do the following in your index.php file&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;&lt;br /&gt;$lang_request = JRequest::getWord('lang'); &lt;br /&gt;$lang_choice = implode("-", str_split($lang_request, 2));&lt;br /&gt;$currentSession = JFactory::getSession();&lt;br /&gt;&lt;br /&gt;if(!empty($lang_choice))&lt;br /&gt;{&lt;br /&gt; $currentSession-&gt;set("langChoice",$lang_choice); &lt;br /&gt; $lang =&amp; JFactory::getLanguage();&lt;br /&gt; $lang-&gt;setLanguage( $lang_choice );&lt;br /&gt; $lang-&gt;load();&lt;br /&gt;}&lt;br /&gt;elseif($currentSession-&gt;getState())&lt;br /&gt;{ &lt;br /&gt; $lang =&amp; JFactory::getLanguage();&lt;br /&gt; $lang-&gt;setLanguage( $currentSession-&gt;get("langChoice") );&lt;br /&gt; $lang-&gt;load();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;when user clicks on a link have your url like the following:&lt;br /&gt;http://www.yoursite.com/?lang=de-DE or /?lang=en-GB&lt;br /&gt;&lt;br /&gt;the lang would be stored in session so you don't need to worry about it anymore.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-8686923796355694519?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/8686923796355694519/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=8686923796355694519' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/8686923796355694519'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/8686923796355694519'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2010/11/let-user-selects-language-in-joomla-15.html' title='Let User Selects Language in Joomla 1.5'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-6034096826562450990</id><published>2010-03-11T16:10:00.000-08:00</published><updated>2010-03-11T16:17:37.258-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Zend Framework'/><title type='text'>Get SQL out of Zend select object</title><content type='html'>To display SQL of Zend_Db_Select object, try this &lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;$query = $this-&gt;select()&lt;br /&gt;                    -&gt;where("permitted = 'Y'")&lt;br /&gt;                    -&gt;order("id DESC")&lt;br /&gt;                    -&gt;limit($count);&lt;br /&gt;&lt;br /&gt;echo $query-&gt;__toString();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;that will do it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-6034096826562450990?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/6034096826562450990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=6034096826562450990' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/6034096826562450990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/6034096826562450990'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2010/03/get-sql-out-of-zend-select-object.html' title='Get SQL out of Zend select object'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-2539830610647944235</id><published>2010-01-02T15:00:00.000-08:00</published><updated>2010-01-02T15:05:57.185-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Joomla'/><title type='text'>Add Select option to your Joomla select list</title><content type='html'>If you like to add 'Select Category' option to the option list you got from DB. &lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;&lt;br /&gt;$db    =&amp; JFactory::getDBO();&lt;br /&gt;$query = "SELECT id as value,name as text FROM  categories WHERE parent_id &gt; 0 ORDER BY name";&lt;br /&gt;$db-&gt;setQuery($query);&lt;br /&gt;$categories = $db-&gt;loadAssocList(); &lt;br /&gt;$begin_categories = array(array("value"=&gt;0,"text"=&gt;"Select Category"));&lt;br /&gt;$categories = array_merge($begin_categories,$categories);&lt;br /&gt;$lists['categories'] = JHTML::_('select.genericlist',  $categories, 'categories', 'class="inputbox" size="1"', 'value', 'text', null);&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I am not sure any better way to do with Joomla classes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-2539830610647944235?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/2539830610647944235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=2539830610647944235' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/2539830610647944235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/2539830610647944235'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2010/01/add-select-option-to-your-joomla-select.html' title='Add Select option to your Joomla select list'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-7803309817652188082</id><published>2010-01-02T10:44:00.000-08:00</published><updated>2010-01-02T10:59:02.731-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Joomla'/><title type='text'>How to add jQuery to Joomla ?</title><content type='html'>The Joomla 1.5 is coming with Mootools therefore you might experience some conflict with jQuery now.&lt;br /&gt;Just follow the way below to avoid any conflicts. Add the following lines to your view.html.php.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;&lt;br /&gt;$document = &amp;JFactory::getDocument();&lt;br /&gt;$document-&gt;addScript( 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' );&lt;br /&gt;$document-&gt;addCustomTag( '&lt;script type="text/javascript"&gt;jQuery.noConflict();&lt;/script&gt;' ); &lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The above code fragment would solve your problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-7803309817652188082?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/7803309817652188082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=7803309817652188082' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/7803309817652188082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/7803309817652188082'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2010/01/how-to-add-jquery-to-joomla.html' title='How to add jQuery to Joomla ?'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-7399569581522796895</id><published>2010-01-02T10:39:00.001-08:00</published><updated>2010-01-02T10:59:30.444-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Joomla'/><title type='text'>How to add Javascript / css to Joomla?</title><content type='html'>How to add Javascript or css to your Joomla template?&lt;br /&gt;&lt;br /&gt;Just do the following to get it working. Add the following lines to your view.html.php.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;&lt;br /&gt;$document = &amp;JFactory::getDocument();&lt;br /&gt;$this-&gt;document-&gt;addStyleSheet('your path/style.css');&lt;br /&gt;$this-&gt;document-&gt;addScript( 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js' );&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That would solve your problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-7399569581522796895?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/7399569581522796895/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=7399569581522796895' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/7399569581522796895'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/7399569581522796895'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2010/01/how-to-add-javascript-css-to-joomla.html' title='How to add Javascript / css to Joomla?'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-4526637779717153640</id><published>2009-11-07T15:58:00.000-08:00</published><updated>2009-11-07T16:05:05.687-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Joomla'/><title type='text'>Adding a calendar / date picker to Joomla form</title><content type='html'>This is how you add a calendar / date picker to Joomla form.&lt;br /&gt;&lt;br /&gt;add the following code to your &lt;br /&gt;xx.html.php class&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;&lt;br /&gt;$document = &amp;JFactory::getDocument();&lt;br /&gt;$document-&gt;addScript("includes/js/joomla.javascript.js");&lt;br /&gt;&lt;br /&gt;JHTML::_('behavior.calendar');&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;and add the following code to the default.php template file &lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;&lt;br /&gt;&lt;input type="text" name="dateofbirth" id="dob" size="15" maxlength="25" value="" class="inputbox required" /&gt; &lt;br /&gt;&lt;input type="reset" class="button" value="..." onclick="return showCalendar('dob','%d/%m/%Y');" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;All those codes above will have a calendar / date picker close to the input field.&lt;br /&gt;&lt;br /&gt;Enjoy your coding.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-4526637779717153640?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/4526637779717153640/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=4526637779717153640' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/4526637779717153640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/4526637779717153640'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2009/11/adding-calendar-date-picker-to-joomla.html' title='Adding a calendar / date picker to Joomla form'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-2296157329767734027</id><published>2009-11-03T13:42:00.000-08:00</published><updated>2009-11-03T13:48:01.102-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Debugging view of 2D array</title><content type='html'>If you are in a position to have a better view of 2 dimensional array then try this &lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;&lt;br /&gt;$fruits["apple"] = array("Canada","US","Extra");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;print_r($fruits) won't show a better view but the following way would show a clear view of arrays and values&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;&lt;br /&gt;echo "&lt;pre&gt;";&lt;br /&gt;print_r($fruits);&lt;br /&gt;echo "&lt;/pre&gt;";&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Enjoy.&lt;br /&gt;cheers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-2296157329767734027?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/2296157329767734027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=2296157329767734027' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/2296157329767734027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/2296157329767734027'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2009/11/debugging-view-of-2d-array.html' title='Debugging view of 2D array'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-9182871141517880100</id><published>2009-10-29T09:18:00.000-07:00</published><updated>2009-10-29T09:24:00.627-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='htaccess'/><title type='text'>Redirect dynamic URL using .htaccess</title><content type='html'>If you are trying to redirect a dynamic URL follow the steps to do it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;RewriteCond %{QUERY_STRING}  ^product_id=(.*)$&lt;br /&gt;RewriteRule ^product_view\.php$ /products/%1? [R=301,L]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The above statements would do the following,&lt;br /&gt;&lt;br /&gt;http://www.example.com/product_view.php?product_id=4 &lt;br /&gt;&lt;br /&gt;redirected to &lt;br /&gt;&lt;br /&gt;http://www.example.com/products/4&lt;br /&gt;&lt;br /&gt;Hope it helps someone. &lt;br /&gt;cheers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-9182871141517880100?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/9182871141517880100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=9182871141517880100' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/9182871141517880100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/9182871141517880100'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2009/10/redirect-dynamic-url-using-htaccess.html' title='Redirect dynamic URL using .htaccess'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-6379298832597293241</id><published>2009-09-07T12:46:00.000-07:00</published><updated>2010-01-02T11:33:09.618-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>select records whose id is not present in the other table</title><content type='html'>If you are trying to select records whose ids are not present in the other table,&lt;br /&gt;&lt;br /&gt;eg: articles table has article_id, categorized table has article_id and cat_id. &lt;br /&gt;If you are trying to select the article that is not categorized yet&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;&lt;br /&gt;SELECT * FROM articles WHERE article_id NOT IN ( SELECT article_id FROM categorized );&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;That will solve your problem.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-6379298832597293241?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/6379298832597293241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=6379298832597293241' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/6379298832597293241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/6379298832597293241'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2009/09/select-records-whose-id-is-not-present.html' title='select records whose id is not present in the other table'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-499461702644654844</id><published>2009-09-02T06:42:00.000-07:00</published><updated>2010-01-02T11:02:40.015-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL to filter duplicate records</title><content type='html'>If you are trying to filter out duplicate records from your table.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;&lt;br /&gt;SELECT DISTINCT column_name,id FROM table_name &lt;br /&gt;GROUP BY coulumn_name&lt;br /&gt;HAVING COUNT(column_name) &gt; 1&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The above sql would filter out duplicate records with their ids.&lt;br /&gt;&lt;br /&gt;cheers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-499461702644654844?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/499461702644654844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=499461702644654844' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/499461702644654844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/499461702644654844'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2009/09/sql-to-filter-duplicate-records.html' title='SQL to filter duplicate records'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-7134935763632641371</id><published>2009-08-31T12:01:00.000-07:00</published><updated>2010-01-02T11:33:52.976-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL to get count of records</title><content type='html'>This is for MySQL I have no idea about other DBs&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;&lt;br /&gt;$query = mysql_query("SELECT count(*) FROM accounts");&lt;br /&gt;$ctr = mysql_result($query,0,0);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Hope it helps someone.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-7134935763632641371?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/7134935763632641371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=7134935763632641371' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/7134935763632641371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/7134935763632641371'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2009/08/sql-to-get-count-of-records.html' title='SQL to get count of records'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-7832984256106350750</id><published>2009-08-03T08:51:00.000-07:00</published><updated>2009-08-03T08:56:00.755-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CentOS'/><category scheme='http://www.blogger.com/atom/ns#' term='General Tips'/><title type='text'>Remove ^M from your PHP script file</title><content type='html'>If you happened to see ^M at end of every line of your code, it's a real pain. You can remove the character from the file somehow.&lt;br /&gt;&lt;br /&gt;from your command line (Linux)&lt;br /&gt;&lt;br /&gt;1) sed -e 's/^M//g' index.php &gt; ind.php&lt;br /&gt;   [ ctrl v + ctrl M would give your ^M char on command line ]&lt;br /&gt;&lt;br /&gt;2) mv ind.php index.php&lt;br /&gt;&lt;br /&gt;Now, your index file is free of ^M characters. Enjoy coding.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-7832984256106350750?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/7832984256106350750/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=7832984256106350750' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/7832984256106350750'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/7832984256106350750'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2009/08/remove-m-from-your-php-script-file.html' title='Remove ^M from your PHP script file'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-4343575036195077407</id><published>2009-08-02T08:56:00.000-07:00</published><updated>2009-08-02T09:00:25.710-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Joomla'/><title type='text'>Modify User Registration of Joomla</title><content type='html'>If you'd like to change user registration page of Joomla, follow the following steps to accomplish it.&lt;br /&gt;&lt;br /&gt;1) Change in template file (under components/user/)&lt;br /&gt;2) modify /libraries/joomla/user/user.php&lt;br /&gt;3) modify /libraries/joomla/database/table/user.php&lt;br /&gt;&lt;br /&gt;and also modify users table of joomla using any db admin scripts eg:phpMyadmin&lt;br /&gt;&lt;br /&gt;Modify those files as per your request, you will see a modified user registration page of Joomla.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-4343575036195077407?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/4343575036195077407/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=4343575036195077407' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/4343575036195077407'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/4343575036195077407'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2009/08/modify-user-registration-of-joomla.html' title='Modify User Registration of Joomla'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-2174060519759644056</id><published>2009-07-26T08:07:00.000-07:00</published><updated>2009-07-26T08:13:08.269-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='General Tips'/><title type='text'>How to enable Javascript in different browsers?</title><content type='html'>If you are looking forward to enable Javascript in different browsers, just check whether it's disabled first by visiting the site.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.isjavascriptenabled.com"&gt;www.isjavascriptenabled.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;That would tell you whether it's enabled or disabled&lt;br /&gt;&lt;br /&gt;How to enable the Javascript now?&lt;br /&gt;&lt;br /&gt;Go to the site get info as per your browser.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.tranexp.com/win/JavaScript-enabling.htm"&gt;www.tranexp.com/win/JavaScript-enabling.htm&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-2174060519759644056?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/2174060519759644056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=2174060519759644056' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/2174060519759644056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/2174060519759644056'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2009/07/how-to-enable-javascript-in-different.html' title='How to enable Javascript in different browsers?'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-7927967988555057466</id><published>2009-07-19T23:16:00.000-07:00</published><updated>2009-07-19T23:22:54.855-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='htaccess'/><title type='text'>Redirect using mod_rewrite</title><content type='html'>if you are trying to redirect any subdomain request to the root, try the following method. The URL will not change in the address bar.&lt;br /&gt;&lt;br /&gt;RewriteCond %{HTTP_HOST} ^business\.rootdomain\.com&lt;br /&gt;RewriteCond %{REQUEST_URI} !^/business/&lt;br /&gt;RewriteRule (.*) http://www.rootdomain.com/business/$1 [P]&lt;br /&gt;&lt;br /&gt;if you get any internal error, add proxy &amp; proxy http modules to Apache.&lt;br /&gt;&lt;br /&gt;restart the web server,it should work now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-7927967988555057466?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/7927967988555057466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=7927967988555057466' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/7927967988555057466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/7927967988555057466'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2009/07/redirect-using-modrewrite.html' title='Redirect using mod_rewrite'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-8643722554690342478</id><published>2009-07-06T14:15:00.000-07:00</published><updated>2009-07-06T14:22:50.768-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CentOS'/><title type='text'>Installing Secure Shell PHP SSH2 on CentOS</title><content type='html'>If you are looking forward to install SSH2, follow the link to do so. It works and save you a lots time.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://cubiclegeneration.com/web-servers/installing-secure-shell2-ssh2-php-extension"&gt;http://cubiclegeneration.com/web-servers/installing-secure-shell2-ssh2-php-extension&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;if you experience any issue at these lines&lt;br /&gt;&lt;br /&gt;gunzip libssh2-0.18.tar.gz&lt;br /&gt;&lt;br /&gt;tar -xvf libssh2-0.18.tar.gz&lt;br /&gt;&lt;br /&gt;Just remove the .gz from the end, would work.&lt;br /&gt;&lt;br /&gt;Done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-8643722554690342478?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/8643722554690342478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=8643722554690342478' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/8643722554690342478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/8643722554690342478'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2009/07/installing-secure-shell-php-ssh2-on.html' title='Installing Secure Shell PHP SSH2 on CentOS'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-3530861030258246853</id><published>2009-06-10T05:39:00.000-07:00</published><updated>2009-06-10T06:10:42.355-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Joomla'/><title type='text'>htaccess issue with SEF URL in Joomla</title><content type='html'>On your developer box: You enabled SEF in Joomla by doing the following way:&lt;br /&gt;&lt;br /&gt;1.rename htaccess.txt to .htaccess&lt;br /&gt;2.Global Configuration -&gt; SEO Settings (set yes to everything) and save it&lt;br /&gt;&lt;br /&gt;Refresh your Joomla site&lt;br /&gt;click on your site links - if the short url is working then everything is cool if &lt;span style="font-weight:bold;"&gt;NOT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;open up your Apache config file and &lt;br /&gt;&lt;br /&gt;add the following lines to your virtual host setup &lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;Directory&gt;        &lt;br /&gt;    AllowOverride      all&lt;br /&gt;&lt;/Directory&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;save the config file and &lt;span style="font-weight:bold;"&gt;restart the apache&lt;/span&gt;.&lt;br /&gt;DONE.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-3530861030258246853?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/3530861030258246853/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=3530861030258246853' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/3530861030258246853'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/3530861030258246853'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2009/06/htaccess-issue-with-sef-url-in-joomla.html' title='htaccess issue with SEF URL in Joomla'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-7384350702204685241</id><published>2009-05-09T14:02:00.000-07:00</published><updated>2009-05-09T14:10:02.372-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CentOS'/><title type='text'>Installing flash player on centOS 5 (64bits)</title><content type='html'>If you having trouble with your flash player in CentOS 5 ( 64 bits) then follow the link to make it work. I googled for help and found out this after a long time. It's good. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.yqed.com/install-flash-player-10-centos-64-bits/"&gt;http://www.yqed.com/install-flash-player-10-centos-64-bits/&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Enjoy your flash player.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-7384350702204685241?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/7384350702204685241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=7384350702204685241' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/7384350702204685241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/7384350702204685241'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2009/05/installing-flash-player-on-centos-5.html' title='Installing flash player on centOS 5 (64bits)'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-3217578328618913956</id><published>2009-04-05T14:12:00.000-07:00</published><updated>2009-04-05T14:29:54.272-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>isset, empty functions of PHP</title><content type='html'>Always pay attention to these functions.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;$a = 0;&lt;br /&gt;// isset() - treats $a as not empty&lt;br /&gt;if(isset($a))&lt;br /&gt;  echo "a has ".$a;&lt;br /&gt;&lt;br /&gt;// empty() - treats $a as empty&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;having trouble with empty() with the editor&lt;br /&gt;&lt;br /&gt;if(empty($a))&lt;br /&gt;  echo "a has ".$a;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;both functions will display "a has 0".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-3217578328618913956?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/3217578328618913956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=3217578328618913956' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/3217578328618913956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/3217578328618913956'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2009/04/isset-empty-functions-of-php.html' title='isset, empty functions of PHP'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-5957990004337946492</id><published>2009-04-03T23:59:00.000-07:00</published><updated>2009-04-04T01:15:27.466-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Reading a file into a string in PHP</title><content type='html'>If you'd like to get the entire content of a file into a string then follow the way&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;&lt;br /&gt;// have your filename with path&lt;br /&gt;$file_name = "yourfilename.ext";   &lt;br /&gt;$content_string = file_get_contents($file_name);&lt;br /&gt;echo $content_string;   // will display the content&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;want to display total chars in the file?&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;echo strlen($content_string);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To read file into array.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;// have your filename with path&lt;br /&gt;$file_name = "yourfilename.ext";  &lt;br /&gt;$content = file($filename);         &lt;br /&gt;foreach($content as $content_row) &lt;br /&gt;  echo $content_row;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-5957990004337946492?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/5957990004337946492/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=5957990004337946492' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/5957990004337946492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/5957990004337946492'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2009/04/reading-file-into-string-in-php.html' title='Reading a file into a string in PHP'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-5220038277161583149</id><published>2009-02-05T12:58:00.000-08:00</published><updated>2009-02-11T11:20:08.217-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Regex'/><title type='text'>Regex for validating Canada postal code and US zip code</title><content type='html'>&lt;pre name="code" class="php"&gt;&lt;br /&gt;// checks postal code format L4X-1S9&lt;br /&gt;$regex = '/[a-z][0-9][a-z][- ]?[0-9][a-z][0-9]$/i';&lt;br /&gt;if( preg_match($regex, $zip) )&lt;br /&gt;  echo "Valid postal code";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// checks for 5 digit or 9 digit zip code or 12345-6789&lt;br /&gt;// or 123456789&lt;br /&gt;$regex = '/(^\d{5}$)|(^\d{5}-\d{4}$)|(^\d{9}$)/'&lt;br /&gt;if( preg_match($regex, $zip) )&lt;br /&gt;  echo "Valid Zip code";&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-5220038277161583149?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/5220038277161583149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=5220038277161583149' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/5220038277161583149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/5220038277161583149'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2009/02/regex-for-validating-canada-postal-code.html' title='Regex for validating Canada postal code and US zip code'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-1975355817509882256</id><published>2009-01-26T06:39:00.001-08:00</published><updated>2009-02-10T11:51:07.589-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Passing a PHP array to Javascript</title><content type='html'>PHP array:&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;$fruits = array("Apple","Mango","Banana");&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;convert $fruits to Javascript array&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;echo 'var fruits = new Array("',join($fruits,'","'),'");';&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The above statement will convert PHP array to Javascript array. This saves a lot of time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-1975355817509882256?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/1975355817509882256/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=1975355817509882256' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/1975355817509882256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/1975355817509882256'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2009/01/passing-php-array-to-javascript.html' title='Passing a PHP array to Javascript'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-6923043828446298380</id><published>2008-11-18T16:24:00.001-08:00</published><updated>2009-04-05T13:30:03.250-07:00</updated><title type='text'>Registration and Login Script in PHP</title><content type='html'>not completed yet&lt;br /&gt;&lt;br /&gt;PART 1&lt;br /&gt;&lt;br /&gt;Lets create the table structure we need to register our users.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="sql"&gt;&lt;br /&gt;CREATE TABLE members (&lt;br /&gt;member_id int(10) unsigned NOT NULL auto_increment,&lt;br /&gt;first_name varchar(100) NOT NULL,&lt;br /&gt;last_name varchar(100) NOT NULL,&lt;br /&gt;email_address varchar(100) NOT NULL,&lt;br /&gt;date_registered datetime NOT NULL,&lt;br /&gt;last_accessed datetime NOT NULL,&lt;br /&gt;password char(32) NOT NULL,&lt;br /&gt;profile_name varchar(30) NOT NULL,&lt;br /&gt;PRIMARY KEY  (member_id)&lt;br /&gt;) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;copy and paste the sql into phpMysqladmin sql window and execute it. You would create a table members in your database.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PART 2&lt;br /&gt;&lt;br /&gt;copy and paste the following code into a php file called register.php. If anybody wants to register with your site they have to access through the site.&lt;br /&gt;&lt;br /&gt;http://www.yourserver.com/register.php&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;&lt;br /&gt;if($_POST['submit_registration']) {&lt;br /&gt;&lt;br /&gt;   // enter your database info here -----&lt;br /&gt;&lt;br /&gt;   $db_name =   ;     // find your db name and add it over here&lt;br /&gt;   $user =    ;          // find your db username and add it here&lt;br /&gt;   $password  =   ;    // add your password to the db here&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   // check user input and filter them&lt;br /&gt;   $firstname = mysql_real_escape_string($_POST['fname']);&lt;br /&gt;   $lastname  = mysql_real_escape_string($_POST['lname']);&lt;br /&gt;   $profile   = mysql_real_escape_string($_POST['pname']);&lt;br /&gt;   $email     = mysql_real_escape_string($_POST['email']);&lt;br /&gt;   $password  = mysql_real_escape_string($_POST['password']);&lt;br /&gt;   $cpassword = mysql_real_escape_string($_POST['cpassword']);&lt;br /&gt;&lt;br /&gt;   if(!$firstname || !$lastname || !$profile || !$email || !$password || !$cpassword) {&lt;br /&gt;&lt;br /&gt;         echo "All fields are required, please fill them";&lt;br /&gt;   }&lt;br /&gt;   else {&lt;br /&gt;&lt;br /&gt;       // ------------------- DON'T TOUCH BELOW NOW-----------------&lt;br /&gt;        $db_link = @mysql_connect("localhost",$user,$password);&lt;br /&gt;&lt;br /&gt;        if($db_link)&lt;br /&gt;              @mysql_select_db($db_name);&lt;br /&gt;        else {&lt;br /&gt;              echo "Error in your db connection, check db_name, user_name and password";&lt;br /&gt;              exit;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt; if(!mysql_query("select member_id from members where email='$email' or profile_name='$profile')) {&lt;br /&gt;  $has_success = @mysql_query("insert into members values(null,'$firstname','$lastname','$email',now(),now(),md5($password),'$profile')");&lt;br /&gt;  if($has_success)&lt;br /&gt;   echo "Your registration was successful";&lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt;  echo "The profile name / email is already registered");&lt;br /&gt;   }&lt;br /&gt;else {&lt;br /&gt; // display registration form    &lt;br /&gt;?&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="html"&gt;&lt;br /&gt;&amp;lt;form method=&amp;quot;post&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;table  cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt; &amp;lt;tbody&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;First Name&amp;lt;/td&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;&amp;lt;input name=&amp;quot;fname&amp;quot; maxlength=&amp;quot;255&amp;quot; size=&amp;quot;20&amp;quot; value=&amp;quot;&amp;quot; type=&amp;quot;text&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt; &amp;lt;/tr&amp;gt;&lt;br /&gt; &amp;lt;tr&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;Last Name&amp;lt;/td&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;&amp;lt;input name=&amp;quot;lname&amp;quot; maxlength=&amp;quot;255&amp;quot; size=&amp;quot;20&amp;quot; value=&amp;quot;&amp;quot;  type=&amp;quot;text&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt; &amp;lt;/tr&amp;gt;&lt;br /&gt; &amp;lt;tr&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;Email&amp;lt;/td&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;&amp;lt;input name=&amp;quot;email&amp;quot; maxlength=&amp;quot;255&amp;quot; size=&amp;quot;20&amp;quot; value=&amp;quot;&amp;quot; type=&amp;quot;text&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt; &amp;lt;/tr&amp;gt;&lt;br /&gt; &amp;lt;tr&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;Profile Name&amp;lt;/td&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;&amp;lt;input name=&amp;quot;pname&amp;quot; maxlength=&amp;quot;255&amp;quot; size=&amp;quot;20&amp;quot; value=&amp;quot;&amp;quot; type=&amp;quot;text&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt; &amp;lt;/tr&amp;gt;&lt;br /&gt; &amp;lt;tr&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;Password&amp;lt;/td&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;&amp;lt;input name=&amp;quot;password&amp;quot; maxlength=&amp;quot;255&amp;quot; size=&amp;quot;20&amp;quot; value=&amp;quot;&amp;quot; type=&amp;quot;text&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt; &amp;lt;/tr&amp;gt;&lt;br /&gt; &amp;lt;tr&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;Confirm Password&amp;lt;/td&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;  &amp;lt;td&amp;gt;&amp;lt;input name=&amp;quot;cpassword&amp;quot; maxlength=&amp;quot;255&amp;quot; size=&amp;quot;20&amp;quot; value=&amp;quot;&amp;quot; type=&amp;quot;text&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt; &amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/tbody&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;&lt;?php&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-6923043828446298380?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/6923043828446298380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=6923043828446298380' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/6923043828446298380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/6923043828446298380'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2008/11/registration-and-login-script-in-php_651.html' title='Registration and Login Script in PHP'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-7096735833160390307</id><published>2008-11-18T07:55:00.001-08:00</published><updated>2009-02-10T12:00:29.693-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>Registration and Login Script in PHP</title><content type='html'>&lt;pre name="code" class="sql"&gt;&lt;br /&gt;&lt;br /&gt;CREATE TABLE members (&lt;br /&gt;  member_id int(10) unsigned NOT NULL auto_increment,&lt;br /&gt;  first_name varchar(100) NOT NULL,&lt;br /&gt;  last_name varchar(100) NOT NULL,&lt;br /&gt;  email_address varchar(100) NOT NULL,&lt;br /&gt;  date_registered datetime NOT NULL,&lt;br /&gt;  last_accessed datetime NOT NULL,&lt;br /&gt;  password char(32) NOT NULL,&lt;br /&gt;  profile_name varchar(30) NOT NULL,&lt;br /&gt;  PRIMARY KEY  (member_id)&lt;br /&gt;) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-7096735833160390307?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/7096735833160390307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=7096735833160390307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/7096735833160390307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/7096735833160390307'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2008/11/registration-and-login-script-in-php.html' title='Registration and Login Script in PHP'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-626821365190697246</id><published>2008-11-15T02:24:00.001-08:00</published><updated>2009-04-05T12:27:50.640-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>PHP Introduction</title><content type='html'>&lt;span style="font-weight:bold;"&gt;1.Hello World example&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Use any of your favourite text editor and type your first php code and save it with “helloWorld.php”. Upload it to your web server and then execute it.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;echo “Hello World”;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;to execute : http://www.yourserver.com/helloWorld.php  ( place it in the root directory )&lt;br /&gt;&lt;br /&gt;semicolon means end of  a line.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;2.Conditional Check if..else&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;check for a condition to be true or false. Why do you need to check for conditions? Take a scenario like this. If you are checking the site in the morning I should say "Good morning", so how do we handle this now.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;// if time is less than 12'o clock the site would display &lt;br /&gt;// "Good Morning"&lt;br /&gt;if($time &lt; 12)&lt;br /&gt;   echo "Good Morning";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How do we say good evening now?&lt;br /&gt;&lt;br /&gt;if($time &lt; 12)&lt;br /&gt;   echo "Good Morning";&lt;br /&gt;else   // time is more than 12&lt;br /&gt;   echo "Good Evening";&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Where are those curly braces? If you use one statement just after the if ..condition then you don't need it but if you have more than one line then you shuld open and close curly braces.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;eg: &lt;br /&gt;if($time &lt; 12) {&lt;br /&gt;   echo "Good Morning";&lt;br /&gt;   $num_of_visits = $num_of_visits + 1;&lt;br /&gt;}   &lt;br /&gt;   &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;3.Looping&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Loop is used to repeat a job as many time you want&lt;br /&gt;&lt;br /&gt;while loop &lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;$i=1;&lt;br /&gt;while($i&lt;5) {&lt;br /&gt;   echo “Hello World”.$i;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The above code snippet would display&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Hello World 1Hello World 2Hello World 3Hello World 4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;     &lt;br /&gt;for…loop&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;for($i=0; $i&lt;5; $i++)&lt;br /&gt;   echo $i;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The loop will display 01234 as output.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;do…while&lt;br /&gt;&lt;br /&gt;some times you need your loop to execute at least once regardless of condition&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;$x = 5;&lt;br /&gt;do {&lt;br /&gt;  echo “Hello World”;&lt;br /&gt;}while($x&lt;5);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;though x=5 initially, the loop would execute once because the conditional statement is at the end. When it reaches the end the condition x&lt;5 returns false the loop will not execute any more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-626821365190697246?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/626821365190697246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=626821365190697246' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/626821365190697246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/626821365190697246'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2008/11/hello-world-php.html' title='PHP Introduction'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6925309688585982497.post-1805475283837118435</id><published>2008-10-21T10:49:00.000-07:00</published><updated>2009-02-10T11:49:47.332-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Regex'/><title type='text'>Regex for validating rgb / cymk color code input</title><content type='html'>&lt;pre name="code" class="php"&gt;&lt;br /&gt;// to validate rgb input&lt;br /&gt; &lt;br /&gt;static function is_valid_rgb($rgb_values) {&lt;br /&gt;   // format expected is: array(255,125,60)&lt;br /&gt;  if(!is_array($rgb_values) || count($rgb_values) != 3)&lt;br /&gt;     return false;&lt;br /&gt;&lt;br /&gt;  foreach($rgb_values as $rgb_value) {&lt;br /&gt;    if(!preg_match('/^[0-9]{1}$|^[0-9]{2}$|^[0-1]{1}[0-9]{1}[0-9]{1}$|^[2]{1}[0-5]{1}[0-5]{1} $/',$rgb_value))&lt;br /&gt;         return false;&lt;br /&gt;  }&lt;br /&gt;  return true;&lt;br /&gt;&lt;br /&gt;}  // end of function&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;// to validate cymk input&lt;br /&gt; &lt;br /&gt;static function is_valid_cymk($cymk_values) {&lt;br /&gt;  &lt;br /&gt;   // format expected is: array(255,125,60,199)&lt;br /&gt;   if(!is_array($cymk_values) || count($cymk_values) != 4)&lt;br /&gt;      return false;&lt;br /&gt;  &lt;br /&gt;  foreach($cymk_values as $cymk_value) {&lt;br /&gt;      if(!preg_match('/^[0-9]{1}$|^[0-9]{2}$|^[0-1]{1}[0-9]{1}[0-9]{1}$|^[2]{1}[0-5]{1}[0-5]{1}$/',$cymk_value))&lt;br /&gt;         return false;&lt;br /&gt;   }&lt;br /&gt; &lt;br /&gt;   return true;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6925309688585982497-1805475283837118435?l=devtipsforu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://devtipsforu.blogspot.com/feeds/1805475283837118435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6925309688585982497&amp;postID=1805475283837118435' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/1805475283837118435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6925309688585982497/posts/default/1805475283837118435'/><link rel='alternate' type='text/html' href='http://devtipsforu.blogspot.com/2008/10/regex-for-validating-rgb-cymk-color.html' title='Regex for validating rgb / cymk color code input'/><author><name>Balan Mahadevan</name><uri>http://www.blogger.com/profile/02146551609717603535</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
