<?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>Decrypt Web &#187; Variables</title>
	<atom:link href="http://blog.decryptweb.com/tag/variables/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.decryptweb.com</link>
	<description>Open Source Web Solutions</description>
	<lastBuildDate>Sat, 24 Jul 2010 05:58:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Passing by Reference</title>
		<link>http://blog.decryptweb.com/passing-by-reference/</link>
		<comments>http://blog.decryptweb.com/passing-by-reference/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 07:51:35 +0000</pubDate>
		<dc:creator>DWRoot</dc:creator>
				<category><![CDATA[PHP/MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[reference]]></category>
		<category><![CDATA[Variables]]></category>

		<guid isPermaLink="false">http://blog.decryptweb.com/?p=158</guid>
		<description><![CDATA[I am listing here a simple example to explain &#8216;passing by reference&#8217; in PHP.
I hope it is helpful.

&#60;?php

$a = 5;
echo 'A1-&#62;'.$a.'&#60;br/&#62;';
$b = 6;
$a =&#38; $b;
echo 'A2-&#62;'.$a.'&#60;br/&#62;B1-&#62;'.$b.'&#60;br/&#62;';
global $var;
function foo(&#38;$var)
{
    $var++;
}

$a=5;
echo 'A3-&#62;'.$a.'&#60;br/&#62;';
foo($a);
echo 'A4-&#62;'.$a.'&#60;br/&#62;Var-&#62;'.$var;

?&#62;


For further information kindly visit Passing by Reference





		
			Share this on del.icio.us
		
		
			Digg this!
		
		
			Share this on Reddit
		
		
			Stumble upon something good? Share it on StumbleUpon
		
		
			Share [...]]]></description>
		<wfw:commentRss>http://blog.decryptweb.com/passing-by-reference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reading XML</title>
		<link>http://blog.decryptweb.com/reading-xml/</link>
		<comments>http://blog.decryptweb.com/reading-xml/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 13:30:52 +0000</pubDate>
		<dc:creator>DWRoot</dc:creator>
				<category><![CDATA[XML]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[Variables]]></category>

		<guid isPermaLink="false">http://blog.decryptweb.com/?p=124</guid>
		<description><![CDATA[I am listing here method for reading XML file or XML string with the help of PHP.

&#60;?php
$xml =&#60;&#60;&#60;EOT
&#60;?xml version=&#34;1.0&#34;?&#62;
&#60;root&#62;
&#60;section name=&#34;Section1&#34;&#62;
    &#60;category id=&#34;Category1&#34; name=&#34;google&#34;&#62;
    &#60;article name=&#34;article1&#34;&#62;value1&#60;/article&#62;
    &#60;/category&#62;
    &#60;category id=&#34;Category2&#34; name=&#34;yahoo&#34;&#62;
    &#60;article name=&#34;articleSection2&#34;&#62;Test value&#60;/article&#62;
    &#60;/category&#62;
&#60;/section&#62;
&#60;section name=&#34;Section2&#34;&#62;
  &#60;category id=&#34;category1_of_section2&#34; [...]]]></description>
		<wfw:commentRss>http://blog.decryptweb.com/reading-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Product ID and Product Name in Magento</title>
		<link>http://blog.decryptweb.com/product-id-and-product-name/</link>
		<comments>http://blog.decryptweb.com/product-id-and-product-name/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 13:48:43 +0000</pubDate>
		<dc:creator>DWRoot</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Variables]]></category>

		<guid isPermaLink="false">http://blog.decryptweb.com/?p=122</guid>
		<description><![CDATA[In Magento eCommerce while working with catalog model, There arise the need to fetch product details from product id.
We can get all product details if we have product id.
But sometimes we only have product name, so we need to get product id for getting product details.
I am listing here both the method.
1) Product details from [...]]]></description>
		<wfw:commentRss>http://blog.decryptweb.com/product-id-and-product-name/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Extracting String</title>
		<link>http://blog.decryptweb.com/extracting-string/</link>
		<comments>http://blog.decryptweb.com/extracting-string/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 14:14:32 +0000</pubDate>
		<dc:creator>DWRoot</dc:creator>
				<category><![CDATA[PHP/MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Variables]]></category>

		<guid isPermaLink="false">http://blog.decryptweb.com/?p=106</guid>
		<description><![CDATA[This is small but very useful script.
I have shown example for extracting only &#8217;src&#8217; value from the &#8216;img&#8217;  tag, but you can modify and use as per your requirement using &#8216;preg_match_all&#8217; function.

&#60;?php

$src= '&#60;img height=&#34;120&#34; width=&#34;120&#34; border=&#34;0&#34; src=&#34;http://www.somesite.com/abc.jpg&#34; class=&#34;image&#34;/&#62;';

preg_match_all('/(src)=(&#34;[^&#34;]*&#34;)/i',$src, $matches);	

echo str_replace('&#34;','',$matches[2][0]);	

?&#62;

Output will be &#8216;http://www.somesite.com/abc.jpg&#8217;





		
			Share this on del.icio.us
		
		
			Digg this!
		
		
			Share this on Reddit
		
		
			Stumble upon something good? Share [...]]]></description>
		<wfw:commentRss>http://blog.decryptweb.com/extracting-string/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Page Redirect</title>
		<link>http://blog.decryptweb.com/page-redirect/</link>
		<comments>http://blog.decryptweb.com/page-redirect/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 14:08:31 +0000</pubDate>
		<dc:creator>DWRoot</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PHP/MySQL]]></category>
		<category><![CDATA[Directory]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Variables]]></category>

		<guid isPermaLink="false">http://blog.decryptweb.com/?p=104</guid>
		<description><![CDATA[I have written a script for getting the files list from directory and redirecting the page on selecting option from the select box.
So you will get the script for fetching all the files from current directory and redirecting page on selection.

&#60;h&#62;Please select option&#60;/h&#62;
&#60;?php
$path = $_SERVER['DOCUMENT_ROOT'].$_SERVER['REQUEST_URI']; //current directory physical path

$dir_handle = @opendir($path) or die(&#34;Unable to open [...]]]></description>
		<wfw:commentRss>http://blog.decryptweb.com/page-redirect/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get IP Address in PHP</title>
		<link>http://blog.decryptweb.com/ip-address-php/</link>
		<comments>http://blog.decryptweb.com/ip-address-php/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 11:08:40 +0000</pubDate>
		<dc:creator>DWRoot</dc:creator>
				<category><![CDATA[PHP/MySQL]]></category>
		<category><![CDATA[IP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Variables]]></category>

		<guid isPermaLink="false">http://blog.decryptweb.com/?p=85</guid>
		<description><![CDATA[Many times we need the IP Address of the User visiting our website in our Application.
I am listing here the method to get the User IP Address, hope it might be useful to many of you.

//function for getting IP
//start
function getuserip()
{

    if (isset($_SERVER))
   {
        [...]]]></description>
		<wfw:commentRss>http://blog.decryptweb.com/ip-address-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Joomla essentials</title>
		<link>http://blog.decryptweb.com/joomla-essentials/</link>
		<comments>http://blog.decryptweb.com/joomla-essentials/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 06:25:38 +0000</pubDate>
		<dc:creator>DWRoot</dc:creator>
				<category><![CDATA[Joomla]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[JPATH]]></category>
		<category><![CDATA[Variables]]></category>

		<guid isPermaLink="false">http://blog.decryptweb.com/?p=40</guid>
		<description><![CDATA[Joomla is a very great CMS.
I am listing below important variable used in joomla.
JPath is used to get the directory path.
DS — is used as a directory separator.
JPATH_ADMINISTRATOR– Sets the path to /Joomla/administrator
JPATH_BASE — sets the entry to joomla /Joomla
JPATH_CACHE –Sets the cache path /Joomla/cache
JPATH_COMPONENT — Sets the component path /Joomla/components/com_example
JPATH_COMPONENT_ADMINISTRATOR — sets the backend [...]]]></description>
		<wfw:commentRss>http://blog.decryptweb.com/joomla-essentials/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Magento Essentials</title>
		<link>http://blog.decryptweb.com/magento-essentials/</link>
		<comments>http://blog.decryptweb.com/magento-essentials/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 06:01:48 +0000</pubDate>
		<dc:creator>DWRoot</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Currency]]></category>
		<category><![CDATA[Path]]></category>
		<category><![CDATA[Store]]></category>
		<category><![CDATA[Symbol]]></category>
		<category><![CDATA[Variables]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://blog.decryptweb.com/?p=31</guid>
		<description><![CDATA[I am listing below important variable used in Magento.

&#60;?php
echo Mage::app()-&#62;getFrontController()-&#62;getRequest()-&#62;getHttpHost();
//displays host name

echo Mage::getBaseDir();  //gives  physical path of the sites root directory

echo $this-&#62;getSkinURL(); //gives  relative path of the sites default skin folder

echo Mage::getBaseURL(); //gives  relative path of the site

echo Mage::getURL(); //gives  relative path of the site

echo $customerEntityType = Mage::getModel('eav/entity')-&#62;setType('customer')-&#62;getTypeId();
//customer type

$website = [...]]]></description>
		<wfw:commentRss>http://blog.decryptweb.com/magento-essentials/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
