SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Help needed...

  1. #1
    ********* Poet X Q mano's Avatar
    Join Date
    Oct 2002
    Location
    Still Thulcandra
    Posts
    997
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help needed...

    Haven't posted here in a while, so...

    This line:

    PHP Code:
    <?php

    $arg
    [$key]['navn'] ."<input type=radio name=parent_id 
    value=
    $arg[$key]['id']><br>\n";

    ?>
    The first $arg[$key]['navn'] outputs the correct name from the array...

    The second $arg[$key]['id'] gives me this value: Array['id']

    So, I guess I've done something wrong... But what?

  2. #2
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I'd just concetanate.

    PHP Code:
    $arg[$key]['navn'] . '<input type="radio" name="parent_id" value="' $arg[$key]['id'] . '" />' "<br>\n"
    Mike
    It's not who I am underneath, but what I do that defines me.

  3. #3
    ********* Poet X Q mano's Avatar
    Join Date
    Oct 2002
    Location
    Still Thulcandra
    Posts
    997
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks,

    Umm...

    I got a parse error in a line further down that I didn't have before...

    PHP Code:
    <?php

              
    if ($doexpand)
                {
                  
    array_pop($this->exp_arr);
                  
    array_push($this->exp_arr"expand[" $arg[$key]['id'] . "]=" $doexpand); // error here...
                  
    $this->print_subs($argkey);
                }

    ?>
    The previous line was directly above this if-statement...

  4. #4
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    can you post the full code? The code I posted is just a fragment, and would throw an error on its own.
    Mike
    It's not who I am underneath, but what I do that defines me.

  5. #5
    ********* Poet X Q mano's Avatar
    Join Date
    Oct 2002
    Location
    Still Thulcandra
    Posts
    997
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure...

    The whole code in itself is pretty much, do you need more than this:

    PHP Code:

    <?php

    print $this->make_delim() . '<a href="reg_hierarki.php?page=' .
     
    $_GET["page"] . '&' join('&',$this->exp_arr) . '&' join('&'
     
    ,$temp_prevexp) . '">' $expsymbol "</a>" .
     
    $arg[$key]['navn'] . '<input type="radio" name="parent_id"
     value="' 
    $arg[$key]['id'] . '" />' "<br>\n";
              if (
    $doexpand)                                                                                                                                             
                {
                  
    array_pop($this->exp_arr);
                  
    array_push($this->exp_arr"expand[' . $arg[$key]['id'] . ']=" $doexpand);
                  
    $this->print_subs($argkey);
                }
              
    array_pop($this->exp_arr);
              
    $this->num_subs--;
            }
          return;

    ?>
    Edit:

    Argh, can't make it fit the screen again!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •