<?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>compressing data using php Archives -</title>
	<atom:link href="https://mitindia.in/tag/compressing-data-using-php/feed/" rel="self" type="application/rss+xml" />
	<link>https://mitindia.in/tag/compressing-data-using-php/</link>
	<description></description>
	<lastBuildDate>Sat, 26 Nov 2016 06:50:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://mitindia.in/wp-content/uploads/2023/03/cropped-android-chrome-512x512-1-32x32.png</url>
	<title>compressing data using php Archives -</title>
	<link>https://mitindia.in/tag/compressing-data-using-php/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>PHP Array and Compressing Data</title>
		<link>https://mitindia.in/php-array-and-compressing-data/</link>
					<comments>https://mitindia.in/php-array-and-compressing-data/#comments</comments>
		
		<dc:creator><![CDATA[SKB]]></dc:creator>
		<pubDate>Sat, 18 Jun 2016 09:19:15 +0000</pubDate>
				<category><![CDATA[PHP-MySQL]]></category>
		<category><![CDATA[compressing data using php]]></category>
		<category><![CDATA[sorting]]></category>
		<guid isPermaLink="false">http://www.mitindia.in/?p=74</guid>

					<description><![CDATA[<p>Following example shows that use of an array to sort records in ascending and descending order using PHP program. &#60;?php $arr = array('Apple', 'Zensor', 'MITIndia'); echo "&#60;br&#62;&#60;b&#62;Without sorted values are..&#60;/b&#62;&#60;br&#62;"; echo $arr[0], "&#60;br&#62;"; echo $arr[1], "&#60;br&#62;"; echo $arr[2], "&#60;br&#62;"; echo "&#60;br&#62;&#60;b&#62;Sorted values are..&#60;/b&#62;&#60;br&#62;"; sort($arr); $len=count($arr); for($i=0; $i&#60;$len; $i++) { echo $arr[$i], "&#60;br&#62;"; } echo "&#60;br&#62;&#60;b&#62;Reverse [&#8230;]</p>
<p>The post <a href="https://mitindia.in/php-array-and-compressing-data/">PHP Array and Compressing Data</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Following example shows that use of an array to sort records in ascending and descending order using PHP program.</p>
<pre>&lt;?php
$arr = array('Apple', 'Zensor', 'MITIndia');
echo "&lt;br&gt;&lt;b&gt;Without sorted values are..&lt;/b&gt;&lt;br&gt;";

echo $arr[0], "&lt;br&gt;";
echo $arr[1], "&lt;br&gt;";
echo $arr[2], "&lt;br&gt;";

echo "&lt;br&gt;&lt;b&gt;Sorted values are..&lt;/b&gt;&lt;br&gt;";
sort($arr);
$len=count($arr);
for($i=0; $i&lt;$len; $i++)
{
echo $arr[$i], "&lt;br&gt;";
}

echo "&lt;br&gt;&lt;b&gt;Reverse sorted values are..&lt;/b&gt;&lt;br&gt;";
rsort($arr);
$len=count($arr);
for($i=0; $i&lt;$len; $i++)
{
echo $arr[$i], "&lt;br&gt;";
}
?&gt;</pre>
<p>Out put of the above program is&#8230; (function <b>sort()</b> to use display records in ascending and function <b>rsort()</b> to display in descending order.)</p>
<p><img fetchpriority="high" decoding="async" class="alignnone" src="https://4.bp.blogspot.com/-cO9qYsKaoVI/Vxs5zyo6_xI/AAAAAAAABaU/ubywJHXJa2E9J-nQ47Stu7SM5BWvrIEZACLcB/s1600/arrays.JPG" alt="Array with sort" width="284" height="474" /></p>
<p>PHP Program to compress the data / text.</p>
<pre>&lt;?php
echo "&lt;h1&gt; Compress character with PHP &lt;/h1&gt;";
echo "&lt;hr&gt;";
$str="Hello World Hello WorldHello WorldHello WorldHello 

WorldHello WorldHello WorldHello WorldHello WorldHello 

WorldHello WorldHello WorldHello WorldHello WorldHello 

WorldHello WorldHello WorldHello WorldHello WorldHello 

WorldHello WorldHello WorldHello World";
 
$compressed = gzcompress($str);
echo "Original file length: ". strlen($str)."\n";
echo "Compressed size: ". strlen($compressed)."\n";
?&gt;</pre>
<p>Output of the above program is&#8230;</p>
<p><img decoding="async" src="https://1.bp.blogspot.com/-t7GmvYgIDIM/Vxs455dYN-I/AAAAAAAABaI/Au6OOPXnOP0sHGZWy-VWQLKFvfpmN61bwCLcB/s1600/compress.JPG" alt="Compress data using php function" /></p>
<p>PHP Program to display server date and time.</p>
<pre>&lt;?php
echo "Today date :", date("m/d/y");
echo "&lt;br&gt;The time is " . date("h:i:sA");
echo "&lt;br&gt;";
echo date('d-m-Y H:i');
echo "&lt;br&gt;";
?&gt;</pre>
<p>[m=month, d=day, y=year, h=hours, i=minutes, s=seconds  and A=ante meridiem]   Output of the above program is&#8230;</p>
<p><img decoding="async" src="https://2.bp.blogspot.com/-22mGBgMPgtg/Vxs5jdYbI-I/AAAAAAAABaQ/f8TAQATdh8MGWXiQj24UQn0zKAZmCtsDwCLcB/s1600/time.JPG" alt="Time and date using php" /></p>
<p><a class="a2a_button_whatsapp" href="https://www.addtoany.com/add_to/whatsapp?linkurl=https%3A%2F%2Fmitindia.in%2Fphp-array-and-compressing-data%2F&amp;linkname=PHP%20Array%20and%20Compressing%20Data" title="WhatsApp" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fmitindia.in%2Fphp-array-and-compressing-data%2F&amp;linkname=PHP%20Array%20and%20Compressing%20Data" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fmitindia.in%2Fphp-array-and-compressing-data%2F&#038;title=PHP%20Array%20and%20Compressing%20Data" data-a2a-url="https://mitindia.in/php-array-and-compressing-data/" data-a2a-title="PHP Array and Compressing Data"><img src="https://static.addtoany.com/buttons/favicon.png" alt="Share"></a></p><p>The post <a href="https://mitindia.in/php-array-and-compressing-data/">PHP Array and Compressing Data</a> appeared first on <a href="https://mitindia.in"></a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://mitindia.in/php-array-and-compressing-data/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
