Re: foreach questions OT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 01 January 2008 20:47:18 jekillen wrote:
> Hello;
> I have this section of code:
>
>   @include('tmp_index.php');
>     foreach($index as $key -> $value)
>            {
>             if($input == $key)
>               {
>                $target_file = $value;
>               }
>            }
> And I am getting this error:
> Fatal error: Cannot access empty property in <path>/confirmation.php on
> line 131

I bought the property on line 131 just before you tried to access it. I put up 
a high electric fence, just over the path and theres nothing there yet, but 
working up a mortgage right now. ;D sry. late nite last night.

>
> Several questions:
> How long can an index be in an associative array? (the indexes I use in
> this array are 32 character hashes)
> Can it start with a number (since a hash can start with a number)
> Can I use $index as an array name? (I do not remember off hand what the
> reserved key words are)
> I am not sure what the "empty property" is that it is referring to.
> Thank you in advance for info;
> Jeff K



-- 
---
Børge Holen
http://www.arivene.net

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux