#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    49
    Rep Power
    15
    when each time i try to passing the multi-dimensional array out from include file and use in list....each statement, i get an error saying the value that i pass out is not an array. can somebody help me to solve this problem?
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    Are u sure that file is including in the php script?.

    can you show us your script ?



    ------------------
    SR -
    shiju.dreamcenter.net

    "The fear of the LORD is the beginning of knowledge..."
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    49
    Rep Power
    15
    my scripts is as below:

    $homedir = /usr/........./;
    $file = $homedir."set.inc";

    include "$file";

    while(list($name, $value) = each($location));
    {
    while(list($pname,$pvalue) = each($value));
    {
    echo "$value";
    }
    }

    my include file:
    $location = array(
    "KL" = array(
    wheather => "Sunny",
    Celsius => "Rain";
    ),
    "PJ" = array(
    wheather => "Rain",
    Celsius => "Sunny"
    )
    )


  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    49
    Rep Power
    15
    my scripts is as below:

    $homedir = /usr/........./;
    $file = $homedir."set.inc";

    include "$file";

    while(list($name, $value) = each($location));
    {
    while(list($pname,$pvalue) = each($value));
    {
    echo "$value";
    }
    }

    my include file:
    $location = array(
    "KL" = array(
    wheather => "Sunny",
    Celsius => "Rain";
    ),
    "PJ" = array(
    wheather => "Rain",
    Celsius => "Sunny"
    )
    )


Similar Threads

  1. C program to read from a data file into an array
    By rathornton in forum C Programming
    Replies: 4
    Last Post: March 16th, 2004, 11:23 AM
  2. Pointer problem in opening a file
    By LAKI in forum C Programming
    Replies: 13
    Last Post: February 11th, 2004, 08:27 AM
  3. .raw file into 2d array
    By rorybreen1 in forum C Programming
    Replies: 2
    Last Post: January 30th, 2004, 11:02 AM
  4. From form write to file - array
    By TuxLives in forum PHP Development
    Replies: 0
    Last Post: January 25th, 2004, 01:22 AM
  5. passing variables from a txt file to flash
    By matto in forum Flash Help
    Replies: 1
    Last Post: January 20th, 2004, 11:25 AM

IMN logo majestic logo threadwatch logo seochat tools logo