=> <---- What is it?
Posted: Sat Oct 12, 2002 11:36 am
I'm new to programming and have seen the '=>' used and was wondering : What is it?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
$arr = array('index'=>'value');Code: Select all
foreach($arr as $key=>$value)nope, that's >=conthox wrote:$a => $b
means that
$a is greater than or equal to $b
Code: Select all
$arr = array(
'abc' => 'value',
'def' => 'value',
'ghi' => 'value'
);
echo '<pre>';
foreach($arr as $key => $value){
echo $key." - ".$value."\n";
}
echo '</pre>';
print_r($arr);