Hello blur, welcome! lol was just responding to myself since no one else has said hello. Maybe I am saying hello in the wrong place... well, anywho...
I have an array question. I am almost finished with my very first iPhone app written in... you guessed it... Objective-C...
I am from a php, javascript background. I am used to making arrays indexed by key value,
e.g.
<?php
$array = array(
'fruit1' => 'apple',
'fruit2' => 'orange',
'fruit3' => 'grape',
'fruit4' => 'apple',
'fruit5' => 'apple');
// this cycle echoes all associative array
// key where value equals "apple"
while ($fruit_name = current($array)) {
if ($fruit_name == 'apple') {
echo key($array).'
';
}
next($array);
}
?>
my question, Is there a way to do something similar in objective-C
The array I would like to build would be something like
array[0] = -411; // negative value
array[1] = -410;
array[2] = -409;
array[3] = -408;
Thanks in advance for any and all help
