Re: Populating array with function

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

 



Dotan Cohen wrote:
> On 27/02/07, Brad Bonkoski <bbonkoski@xxxxxxxxxxxxxx> wrote:
>> perhaps look into the array_push() function http://www.php.net/array_push
>>
> 
> Thanks, but I cannot use array_push() as I don't know the name of the
> array that I'll be pushing to. There are four calls to the listFiles
> function, and each will populate a different array.

the use of array_push() is not needed but the premise that it cannot
be used is wrong - the array inside the function is always called $files.

your problem is due to a simple typo, you could have checked the actual return
value of the function and seen that it does return the array:

var_dump( listFiles($thumbnailsDirectory) );

> 
> Dotan Cohen
> 
> http://what-is-what.com/what_is/digg.html
> http://english-lyrics.com
> 

-- 
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