<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kikiki-kiki</author_name>
  <author_url>https://blog.hatena.ne.jp/kikiki-kiki/</author_url>
  <blog_title>かもメモ</blog_title>
  <blog_url>https://chaika.hatenablog.com/</blog_url>
  <categories>
    <anon>PHP</anon>
  </categories>
  <description>キーが数字のみの連想配列をarray_merge()すると、 キーが文字列ではなく整数扱いになりキーが変わってしまうことが有る。 例えば年を選択させるセレクトボックスのoptionを作るときとか。 &lt;?php $year = array( '2014' =&gt; 2014, '2013' =&gt; 2013, '2012' =&gt; 2012, '2011' =&gt; 2011, ); $def = array( 'year' =&gt; 'year', ); var_dump( array_merge($def, $year) ); // 出力結果 # array (size=5) # 'year' =&gt; str…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchaika.hatenablog.com%2Fentry%2F2014%2F03%2F04%2F202917&quot; title=&quot;PHP 連想配列の結合で気をつけること - かもメモ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-03-04 20:29:17</published>
  <title>PHP 連想配列の結合で気をつけること</title>
  <type>rich</type>
  <url>https://chaika.hatenablog.com/entry/2014/03/04/202917</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
