Results 1 to 3 of 3

Thread: need an explanation

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2002
    Location
    www.mechboxer.de
    Posts
    15

    Exclamation need an explanation

    what is this for:
    1. ->
    2. =>
    what can i do with these syntax...

    i am sorry about this stupid question...
    -=|www.mechboxer.de|=-

  2. #2

    Thread Starter
    New Member
    Join Date
    Dec 2002
    Location
    www.mechboxer.de
    Posts
    15
    in a script it is used like this:
    $template -> assign_block_vars("avatar_row", array());

    OR like this:

    $template->assign_block_vars('avatar_row.avatar_option_column', array(
    "S_OPTIONS_AVATAR" => $avatar_images[$category][$i][$j])
    );
    -=|www.mechboxer.de|=-

  3. #3
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    answering your own question?

    the -> is used when you are accessing classes and this is the way to assign a variable to the calss or something.

    => assigns variables to an array or another variable.

    $array = array (1=>"first value");
    foreach($array AS $index => $value){

    }

    now see the value "first value" in teh array is assigned to 1, and in the foreach $index = 1 and $value = "first value"

    get it?

Posting Permissions

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



Click Here to Expand Forum to Full Width