1. Home >
  2. Apps >
  3. Groups >

query in php

Question asked by manojsinghrana in #PHP on Sep 10, 2010
manojsinghrana
manojsinghrana · Sep 10, 2010
Rank D3 - MASTER
foreach($delete as $key =>$value)

i am not able to get this code. can someone please tell me what this piece of code actually do. Thank you Posted in: #PHP
Manish Goyal
Manish Goyal · Sep 10, 2010
Rank A2 - PRO
It is used in case of associative array,in these type of array each ID key is associated with a value.

For eg if you want to store price of cars in an array then it will be good idea to store it in this way

$car=array("Maruti"=>200000,"BMW"=>"100000");
foreach ($a as $key => $v) {
echo $car[$key];
}
manojsinghrana
manojsinghrana · Sep 11, 2010
Rank D3 - MASTER
what is $v in the code above..?

You must log-in or sign-up to reply to this post.

Click to Log-In or Sign-Up