Announcement

Collapse
No announcement yet.

Code Question

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Code Question

    What the the purpose or meaning of:

    HTML Code:
    ".$spswd."
    versus
    HTML Code:
    "$spswd"
    ?


    Arthur
    -----------------------------------------
    Arthur Klisiewicz
    dATA POINT SOFTWARE
    www.datapointsoftware.com

  • #2
    Arthur,

    I think what you are looking at is just a fragment of a line of code.

    The period symbol means to concatenate the items on either side into a single string.

    "abc" . "def" will become "abcdef".

    When using a variable, it can sometimes look a bit weird, for instance:

    $data = "cd";
    echo "ab" . $data . "ef";
    Which again will output "abcdef"

    it looks even worse if we leave out the spaces (I put them in strictly for readability):
    echo "ab".$data."ef";

    $name = "Dave";
    echo "My name is ".$name." and thank you for asking.";


    Dave
    Dave Prue
    Code Whisperer
    Lahar International Corp
    www.lahar.net

    Comment

    Working...
    X