<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How to remove an element from an array</title>
	<atom:link href="http://frish.nl/archives/2007/05/17/how-to-remove-an-element-from-an-array/feed" rel="self" type="application/rss+xml" />
	<link>http://frish.nl/archives/2007/05/17/how-to-remove-an-element-from-an-array?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-remove-an-element-from-an-array</link>
	<description>Design, mark-up, style, internet</description>
	<lastBuildDate>Thu, 19 Jan 2012 05:39:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Hasan Cosgun</title>
		<link>http://frish.nl/archives/2007/05/17/how-to-remove-an-element-from-an-array/comment-page-1#comment-131780</link>
		<dc:creator>Hasan Cosgun</dc:creator>
		<pubDate>Tue, 12 Jan 2010 16:51:35 +0000</pubDate>
		<guid isPermaLink="false">http://frish.nl/archives/2007/05/17/how-to-remove-an-element-from-an-array#comment-131780</guid>
		<description>$n = count($arr) -1;
for ($i = $n; $i &gt;=0; $i--){
  if (!trim($arr[$i]) // this solves: if 2,3 spaces in value?
    array_splice($arr,$i,1);
}

// DONE
// remove _&#039;s from email</description>
		<content:encoded><![CDATA[<p>$n = count($arr) -1;<br />
for ($i = $n; $i &gt;=0; $i&#8211;){<br />
  if (!trim($arr[$i]) // this solves: if 2,3 spaces in value?<br />
    array_splice($arr,$i,1);<br />
}</p>
<p>// DONE<br />
// remove _&#8217;s from email</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Catalin</title>
		<link>http://frish.nl/archives/2007/05/17/how-to-remove-an-element-from-an-array/comment-page-1#comment-131212</link>
		<dc:creator>Catalin</dc:creator>
		<pubDate>Sun, 15 Nov 2009 23:12:56 +0000</pubDate>
		<guid isPermaLink="false">http://frish.nl/archives/2007/05/17/how-to-remove-an-element-from-an-array#comment-131212</guid>
		<description>for ($i = count($array) - 1; $i &gt;= 0; $i–-)

Should be 
$no = count($array);
for ($i = $no - 1; $i &gt;= 0; $i–-)

tnx</description>
		<content:encoded><![CDATA[<p>for ($i = count($array) &#8211; 1; $i &gt;= 0; $i–-)</p>
<p>Should be<br />
$no = count($array);<br />
for ($i = $no &#8211; 1; $i &gt;= 0; $i–-)</p>
<p>tnx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Denis Mazourick</title>
		<link>http://frish.nl/archives/2007/05/17/how-to-remove-an-element-from-an-array/comment-page-1#comment-74677</link>
		<dc:creator>Denis Mazourick</dc:creator>
		<pubDate>Thu, 19 Jun 2008 16:12:29 +0000</pubDate>
		<guid isPermaLink="false">http://frish.nl/archives/2007/05/17/how-to-remove-an-element-from-an-array#comment-74677</guid>
		<description>Why not just use array_splice?
The script will look like

///////////////////////
//Cleanup array

for ($i = count($array) - 1; $i &gt;= 0; $i--)
{
    if ($array[$i] == &quot;&quot; &#124;&#124; $array[$i] == &quot; &quot; &#124;&#124; is_null($array[$i]))
        array_splice($array, $i, 1);
}
//////////////////////////

Should be faster than copying all values from one array to another especially on large arrays.</description>
		<content:encoded><![CDATA[<p>Why not just use array_splice?<br />
The script will look like</p>
<p>///////////////////////<br />
//Cleanup array</p>
<p>for ($i = count($array) &#8211; 1; $i &gt;= 0; $i&#8211;)<br />
{<br />
    if ($array[$i] == &#8220;&#8221; || $array[$i] == &#8221; &#8221; || is_null($array[$i]))<br />
        array_splice($array, $i, 1);<br />
}<br />
//////////////////////////</p>
<p>Should be faster than copying all values from one array to another especially on large arrays.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

