Welcome Guest, Not a member yet? Register   Sign In
passing array to views
#5

[eluser]vitoco[/eluser]
[quote author="Dam1an" date="1246157794"]get_filenames returns a boolean (FALSE) if the opendir command fails, and a boolean is not valid for a foreach loop
To see if this is the case, to a var_dump/print_r on what it returns[/quote]

true , so you could do this in the view to see if the function returns a FALSE or an array
Code:
<?
    if( is_array( $images ) )
    {
        //<pre> tag it's only to make the array structure more readeable
        echo '<pre>'.print_r( $images , true ) .'</pre>';
    }
    else
    {
        echo 'NO IMAGES ( FALSE ) ';
    }
?&gt;

Saludos.


Messages In This Thread
passing array to views - by El Forum - 06-27-2009, 03:44 PM
passing array to views - by El Forum - 06-27-2009, 03:56 PM
passing array to views - by El Forum - 06-27-2009, 03:58 PM
passing array to views - by El Forum - 06-27-2009, 09:40 PM
passing array to views - by El Forum - 06-28-2009, 06:34 PM
passing array to views - by El Forum - 06-29-2009, 06:48 AM
passing array to views - by El Forum - 06-29-2009, 09:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB