Re: Need help accessing the key array. [message #185488 is a reply to message #185476] |
Thu, 03 April 2014 21:20 |
Kevin Burton
Messages: 9 Registered: March 2014
Karma:
|
Junior Member |
|
|
Where does he say the the array was generated by an outside source specifically 'OP' in his code? He says:
How to access the $rates array to echo the associated rate of
"animal" => 1 and "color" => 2 ? (which is 30),
should i re-designed the $rates array?
And
Hi, what I am trying to do is to receive animal variable and color
variable from the user, and finally display associated rate for the
input animal and input.
I'm looking for any ways rather than looping through the $rates
array, is there any possible ways?
Thanks.
On Wednesday, April 2, 2014 12:25:36 PM UTC-5, Jerry Stuckle wrote:
> On 4/2/2014 12:57 PM, Kevin Burton wrote:
>
>> That is what I meant when I said what if you cannot change the input. You replied, "what input?". The input was the array that was specified in the original question.
>
>>
>
>
>
> The array is not "input". Input comes from an outside source. The
>
> array was generated by the OP in his code.
>
>
>
> It's his code. He can change it any way he wants.
>
>
>
> --
>
> ==================
>
> Remove the "x" from my email address
>
> Jerry Stuckle
>
> jstucklex(at)attglobal(dot)net
>
> ==================
|
|
|