Click to See Complete Forum and Search --> : [RESOLVED] . Vs &
Yoosha
Sep 9th, 2008, 12:41 PM
Hi,
What is diff. between . VS &?
Also how to use:
php_smtp.dll
php_pop3.dll
kzatu
Sep 9th, 2008, 01:13 PM
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.
dclamp
Sep 9th, 2008, 05:58 PM
Use the period (.) to concatenate
$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.
penagate
Sep 9th, 2008, 07:40 PM
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:
function passbyref(&$thing)
{
# this will modify the variable, or the reference in the variable, passed in:
$thing = newthing();
}
and enumeration:
foreach ($array as &$val)
{
# this will modify the element in the array:
$val = newval();
}
visualAd
Sep 10th, 2008, 02:40 AM
It is also the binary bitwise AND operator:
$a = 1 & 0; // $a = 0
Yoosha
Sep 10th, 2008, 02:17 PM
Thanks to all. Resolved ;).
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.