Chaitanya Lakshmi
  • About Me
  • Job Duties
  • Knowledge Blog
  • Applications
  • Contact Us
    • Linked In
    • Facebook
  • About Me
  • Job Duties
  • Knowledge Blog
  • Applications
  • Contact Us
    • Linked In
    • Facebook

What will the $array array contain at the end of the execution of the following script?

2/27/2012

1 Comment

 
<?php
$array = array ('1', '1');
foreach ($array as $k => $v) {
$v = 2;
}
?>


  • array (’2′, ’2′)
  • array (’1′, ’1′)
  • array (2, 2)
  • array (Null, Null)
  • array (1, 1)
  • I don’t know
Answer:
array (’1′, ’1′)

1 Comment
Jeniczekk link
9/28/2012 03:52:46 pm

you might be right through all that post

Reply



Leave a Reply.

    Author

    Write something about yourself. No need to be fancy, just an overview.

    Archives

    February 2012

    Categories

    All
    General
    Krds
    Phponweb

    RSS Feed

Powered by Create your own unique website with customizable templates.