<?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/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>ウダ2Blog &#187; 配列</title>
	<atom:link href="http://uda2.com/blog/tag/%e9%85%8d%e5%88%97/feed/" rel="self" type="application/rss+xml" />
	<link>http://uda2.com/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 30 Aug 2010 01:39:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://uda2.com/blog/tag/%e9%85%8d%e5%88%97/feed/" />
		<item>
		<title>とびとびの配列</title>
		<link>http://uda2.com/blog/2007/07/post_7/</link>
		<comments>http://uda2.com/blog/2007/07/post_7/#comments</comments>
		<pubDate>Mon, 09 Jul 2007 12:26:47 +0000</pubDate>
		<dc:creator>uda2</dc:creator>
				<category><![CDATA[制作日記]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[配列]]></category>

		<guid isPermaLink="false">http://uda2.com/wordpress/2007/07/post_7.html</guid>
		<description><![CDATA[配列を結合させ文字列を返すimplodeって関数が変な動きをしたので調べてみると
$a = array(&#8220;A&#8221;,&#8221;B&#8221;,&#8221;C&#8221;);
$a[4] =  [...]]]></description>
			<content:encoded><![CDATA[<p>配列を結合させ文字列を返すimplodeって関数が変な動きをしたので調べてみると<br />
$a = array(&#8220;A&#8221;,&#8221;B&#8221;,&#8221;C&#8221;);<br />
$a[4] = &#8220;E&#8221;;<br />
print implode(&#8220;/&#8221;,$a);<br />
ってやると<br />
A/B/C//E<br />
となると思ってたら<br />
A/B/C/E<br />
とかなる。</p>
<p><span id="more-555"></span><br />
そこで指定していない配列にはnilになってるのかと思うと<br />
if ($a[3] == nil) print&#8221;nil&#8221;;<br />
では何も返ってこなくて<br />
if ($a[3] == &#8220;&#8221;) print&#8221;kara&#8221;;<br />
だと返ってくる。<br />
$a = array(&#8220;A&#8221;,&#8221;B&#8221;,&#8221;C&#8221;);<br />
if ($a[3] == &#8220;&#8221;) $a[3] = &#8220;&#8221;;<br />
$a[4] = &#8220;E&#8221;;<br />
print implode(&#8220;/&#8221;,$a);<br />
とあまり意味の無さそうな事をすると<br />
A/B/C//E<br />
と当初意図していた通りの答えが返ってくる。<br />
無いは無いで明示しないとダメってことか？</p>
<img src="http://uda2.com/blog/?ak_action=api_record_view&id=555&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://uda2.com/blog/2007/07/post_7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://uda2.com/blog/2007/07/post_7/" />
	</item>
		<item>
		<title>PHP：配列の検索</title>
		<link>http://uda2.com/blog/2007/07/php_2/</link>
		<comments>http://uda2.com/blog/2007/07/php_2/#comments</comments>
		<pubDate>Sun, 01 Jul 2007 12:14:12 +0000</pubDate>
		<dc:creator>uda2</dc:creator>
				<category><![CDATA[制作日記]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[検索]]></category>
		<category><![CDATA[配列]]></category>

		<guid isPermaLink="false">http://uda2.com/wordpress/2007/07/php_2.html</guid>
		<description><![CDATA[配列の中を検索する際の関数としてarray-search
を使っていたら、テスト環境（PHPのバージョンが違う）で返す値が違うことが発覚。
いちいちテスト時とアップ時を変えるのが面倒だなと思ってたら
in-arrayを使 [...]]]></description>
			<content:encoded><![CDATA[<p>配列の中を検索する際の関数として<a href="http://manual.xwd.jp/function.array-search.html">array-search</a><br />
を使っていたら、テスト環境（PHPのバージョンが違う）で返す値が違うことが発覚。<br />
いちいちテスト時とアップ時を変えるのが面倒だなと思ってたら<br />
<a href="http://manual.xwd.jp/function.in-array.html">in-array</a>を使ったら解決した。<br />
<a href="http://manual.xwd.jp/function.in-array.html">in-array</a>もPHPのバージョンにより微妙な違いがあるらしいけど今のところ無問題。</p>
<img src="http://uda2.com/blog/?ak_action=api_record_view&id=547&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://uda2.com/blog/2007/07/php_2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://uda2.com/blog/2007/07/php_2/" />
	</item>
	</channel>
</rss>
