<?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>PHP Interview Questions and answers&#187; array_combine archives  &#8211; interview questions and answers</title>
	<atom:link href="http://www.phpinterviewquestions.com/tag/array_combine/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpinterviewquestions.com</link>
	<description>Prepare for your next php based interview with high confidence</description>
	<lastBuildDate>Mon, 26 Sep 2011 08:37:10 +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>Passive Iteration</title>
		<link>http://www.phpinterviewquestions.com/php-interview-questions/passive-iteration/</link>
		<comments>http://www.phpinterviewquestions.com/php-interview-questions/passive-iteration/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 10:49:29 +0000</pubDate>
		<dc:creator>Bart</dc:creator>
				<category><![CDATA[Expert level]]></category>
		<category><![CDATA[PHP Questions]]></category>
		<category><![CDATA[arrays]]></category>
		<category><![CDATA[array_combine]]></category>
		<category><![CDATA[array_walk]]></category>
		<category><![CDATA[array_walk_recursive]]></category>
		<category><![CDATA[Iteration]]></category>

		<guid isPermaLink="false">http://www.phpinterviewquestions.com/?p=49</guid>
		<description><![CDATA[What will be the out put of the following code snippet ?
&#60;?php
function setcase(&#38;$value, &#38;$key){
$value = strtoupper($value);
}
$type = array('internal','external');
$format[] = array('rss','html','xml');
$format[] = array('csv','jason');
$map = array_combine($type, $format);
array_walk_recursive($map, 'setcase');
print_r($map);
?&#62;
Only scalar values will be converted to upper cases. &#8216; internal&#8217; and &#8216;external&#8217; are not passed into the user defined function.
Array
(
    [internal] =&#38;gt; Array
    [...]]]></description>
			<content:encoded><![CDATA[<p>What will be the out put of the following code snippet ?</p>
<pre class="brush: php;">&lt;?php
function setcase(&amp;$value, &amp;$key){
$value = strtoupper($value);
}
$type = array('internal','external');
$format[] = array('rss','html','xml');
$format[] = array('csv','jason');
$map = array_combine($type, $format);
array_walk_recursive($map, 'setcase');
print_r($map);
?&gt;</pre>
<p>Only scalar values will be converted to upper cases. &#8216; internal&#8217; and &#8216;external&#8217; are not passed into the user defined function.</p>
<pre class="brush: php;">Array
(
    [internal] =&amp;gt; Array
        (
            [0] =&amp;gt; RSS
            [1] =&amp;gt; HTML
            [2] =&amp;gt; XML
        )

    [external] =&amp;gt; Array
        (
            [0] =&amp;gt; CSV
            [1] =&amp;gt; JASON
        )

)
</pre>
<p><script type="text/javascript"><!--
google_ad_client = "pub-8695027799979044";
/* 468x15, created 4/16/10 */
google_ad_slot = "1994287074";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpinterviewquestions.com/php-interview-questions/passive-iteration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

