|
-
Sep 9th, 2008, 12:41 PM
#1
Thread Starter
Addicted Member
[RESOLVED] . Vs &
Hi,
What is diff. between . VS &?
Also how to use:
php_smtp.dll
php_pop3.dll
-
Sep 9th, 2008, 01:13 PM
#2
Addicted Member
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}
-
Sep 9th, 2008, 05:58 PM
#3
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
-
Sep 9th, 2008, 07:40 PM
#4
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(); }
-
Sep 10th, 2008, 02:40 AM
#5
Re: . Vs &
It is also the binary bitwise AND operator:
Code:
$a = 1 & 0; // $a = 0
-
Sep 10th, 2008, 02:17 PM
#6
Thread Starter
Addicted Member
Re: . Vs &
Thanks to all. Resolved .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|