Welcome Guest, Not a member yet? Register   Sign In
Not able to pass data to a view
#10

[eluser]Giuseppe Caruso[/eluser]
[quote author="techgnome" date="1284670330"]I meant the loop INSIDE your view file... not in your controller... (in fact there isn't a loop in the controller, but I'm being pedantic).[/quote]
You are not pedantic, I told you it was a newbie question. Smile

Quote:What happens when you take that out? Does the view load then?
It… works! Smile
What's wrong with that code?
Now with the view:
Code:
<html>
    <head>
    <title>showfolders</title>
[removed]
    alert "ciccio";
[removed]
    </head>
    <body>
    <pre>
        &lt;?= print_r($map) ?&gt;
    </pre>
    &lt;/body&gt;
&lt;/html&gt;

I get the following (shortened) page:

Code:
Array
(
    [css] => Array
        (
            [0] => styles.css
        )

    [0] => index.php
    [1] => license.txt
    [system] => Array
        (
            [application] => Array
                (
                    [config] => Array
                        (
                            [0] => autoload.php
                            [1] => config.php
                            [2] => constants.php
                            [3] => database.php
                            [4] => doctypes.php
                            [5] => hooks.php
                            [6] => index.html
                            [7] => mimes.php
                            [8] => routes.php
                            [9] => smileys.php
                            [10] => user_agents.php
                        )

                    [controllers] => Array
                        (
                            [0] => email.php
                            [1] => ftp.php
                            [2] => index.html
                            [3] => start.php
                            [4] => welcome.php
                        )

and so on…

What was wrong with that loop?
Anyway, thanks you all, I learned a lot so far.


Messages In This Thread
Not able to pass data to a view - by El Forum - 09-16-2010, 04:39 AM
Not able to pass data to a view - by El Forum - 09-16-2010, 05:46 AM
Not able to pass data to a view - by El Forum - 09-16-2010, 05:48 AM
Not able to pass data to a view - by El Forum - 09-16-2010, 06:09 AM
Not able to pass data to a view - by El Forum - 09-16-2010, 06:19 AM
Not able to pass data to a view - by El Forum - 09-16-2010, 06:48 AM
Not able to pass data to a view - by El Forum - 09-16-2010, 07:03 AM
Not able to pass data to a view - by El Forum - 09-16-2010, 08:03 AM
Not able to pass data to a view - by El Forum - 09-16-2010, 09:52 AM
Not able to pass data to a view - by El Forum - 09-16-2010, 02:49 PM
Not able to pass data to a view - by El Forum - 09-16-2010, 10:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB