Results 1 to 6 of 6

Thread: [RESOLVED] . Vs &

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Location
    Iran
    Posts
    237

    Resolved [RESOLVED] . Vs &

    Hi,
    What is diff. between . VS &?
    Also how to use:

    php_smtp.dll
    php_pop3.dll
    Y.P.Y

  2. #2
    Addicted Member kzatu's Avatar
    Join Date
    Aug 2003
    Location
    Nevada
    Posts
    148

    Re: . Vs &

    I've been a VB6 coder for a long time and I'm used to using & for concactenating stuff together. In fact less than an hour ago, in PHP, I had typed
    $binary = $binary & ' ' & $si;
    .

    This didn't work like I thought it would. So I retyped it as
    $binay = $binary.' '.$si;
    I'm not sure I've ever used & anywhere in PHP.
    Changes are not permanent, but change is. {Neil Peart}

  3. #3
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: . Vs &

    Use the period (.) to concatenate

    PHP Code:
    $stringa 'dclamp';
    $stringb 'likes pizza!';
    $stringc $stringa ' ' $stringb;

    echo 
    $stringc;
    // Prints: "dclamp likes pizza!" 

    Those 2 dll files are used for POP3 and SMTP. You really dont need to mess with the dll files unless you are installing them.

    EDITED:
    ignorance.
    Last edited by dclamp; Sep 9th, 2008 at 11:24 PM.
    My usual boring signature: Something

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: . Vs &

    The & symbol is the reference operator in C-based grammars. Before PHP 5 we needed to use it in order to get a reference to an object; in PHP 5 objects have reference semantics by default. Now it's mainly only used in function declarations:
    PHP Code:
    function passbyref(&$thing)
    {
      
    # this will modify the variable, or the reference in the variable, passed in:
      
    $thing newthing();

    and enumeration:
    PHP Code:
    foreach ($array as &$val)
    {
      
    # this will modify the element in the array:
      
    $val newval();


  5. #5
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: . Vs &

    It is also the binary bitwise AND operator:
    Code:
    $a = 1 & 0; // $a = 0
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Jan 2007
    Location
    Iran
    Posts
    237

    Re: . Vs &

    Thanks to all. Resolved .
    Y.P.Y

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