Register
FAQ
Calendar
Search
Today's Posts
Rules
Guidelines
SMS enable your application
via Clickatell’s fast, simple and reliable API's, built to integrate with any system.
Click here
to learn more.
Flash Website Builder
- Trendy Site Builder is a Flash Site Building tool that helps users build stunning websites.
Check Out Custom
Custom Logo Design
by LogoBee. Website Design and Free Logo Templates available.
CodingForums.com
>
:: Server side development
>
PHP
Assignment Operator .=
User Name
Remember Me?
Password
Before you post, read our:
Rules
&
Posting Guidelines
Thread Tools
Rate Thread
Enjoy an ad free experience by logging in. Not a member yet?
Register
.
07-31-2008, 09:08 AM
PM User
|
#
1
mpacaon
New Coder
Join Date: Jul 2008
Location: Manila, PH
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
Assignment Operator .=
What does this assignment operator in PHP do?
PHP Code:
.=
// Example
x
.=
y
mpacaon
View Public Profile
Find More Posts by mpacaon
07-31-2008, 09:24 AM
PM User
|
#
2
rangana
Senior Coder
Join Date: Feb 2008
Location: Cebu City, Philippines
Posts: 1,752
Thanks: 65
Thanked 372 Times in 365 Posts
It's
concatenation
.
It does mean the same thing as:
PHP Code:
x
=
x
.
y
Hope that makes sense.
__________________
Learn how to javascript at 02geek
The more you learn, the more you'll realize there's much more to learn
Ray.ph
rangana
View Public Profile
Visit rangana's homepage!
Find More Posts by rangana
07-31-2008, 09:29 AM
PM User
|
#
3
mpacaon
New Coder
Join Date: Jul 2008
Location: Manila, PH
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
Uhm.. What does the "dot" thing do? Does it multiply the 2 variables?
mpacaon
View Public Profile
Find More Posts by mpacaon
07-31-2008, 10:06 AM
PM User
|
#
4
djm0219
Senior Coder
Join Date: Aug 2003
Location: Wake Forest, North Carolina
Posts: 1,229
Thanks: 2
Thanked 190 Times in 188 Posts
The dot is the string concatenation operator. See
this page
of the PHP documentation for the complete details. The .= is referred to as the "concatenating assignment operator".
__________________
Dave
....
HostMonster
for all of your hosting needs
djm0219
View Public Profile
Visit djm0219's homepage!
Find More Posts by djm0219
07-31-2008, 10:19 AM
PM User
|
#
5
abduraooft
Supreme Master coder!
Join Date: Mar 2007
Location: N/A
Posts: 14,689
Thanks: 158
Thanked 2,184 Times in 2,171 Posts
Well, it's the shorthand assignment operator.
a.=b
is equivalent to
a=a.b
, similarly]
a+=b
is equivalent to
a=a+b
(See
http://www.exforsys.com/tutorials/c-...operators.html
=>4. Assignment Operators )
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --
(Dr. APJ. Abdul Kalam)
101 ways to post unanswerable questions in CF
!
SPREAD - the global community of drilling, completion & subsea professionals
abduraooft
View Public Profile
Find More Posts by abduraooft
07-31-2008, 10:37 AM
PM User
|
#
6
ssonawa
New Coder
Join Date: Jul 2008
Location: India
Posts: 39
Thanks: 0
Thanked 2 Times in 2 Posts
Concatenation- joining two strings
In PHP, period is used for concatenating, joining two strings together.
Consider following example,
$a = "Hello ";
$b = $a . "World!"; // now $b contains "Hello World!"
$a = "Hello ";
$a .= "World!"; // now $a contains "Hello World!"
Hope your doubt has got cleared, refer php.net, great resource for PHP F1
Users who have thanked ssonawa for this post:
mpacaon
(07-31-2008)
ssonawa
View Public Profile
Find More Posts by ssonawa
Bookmarks
del.icio.us
StumbleUpon
Google
Digg
Jump To Top of Thread
«
Previous Thread
|
Next Thread
»
Thread Tools
Show Printable Version
Email this Page
Rate This Thread
Rate This Thread
:
5 : Excellent
4 : Good
3 : Average
2 : Bad
1 : Terrible
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
BB code
is
On
Smilies
are
On
[IMG]
code is
On
HTML code is
Off
Forum Rules
Forum Jump
User Control Panel
Private Messages
Subscriptions
Who's Online
Search Forums
Forums Home
:: Client side development
JavaScript programming
DOM and JSON scripting
Ajax and Design
JavaScript frameworks
Post a JavaScript
HTML & CSS
XML
Flash & ActionScript
Adobe Flex
Graphics and Multimedia discussions
General web building
Site reviews
Building for mobile devices
:: Server side development
Apache configuration
Perl/ CGI
PHP
Post a PHP snippet
MySQL
Other Databases
Ruby & Ruby On Rails
ASP
ASP.NET
Java and JSP
Other server side languages/ issues
ColdFusion
Python
:: Computing & Sciences
Computer Programming
Computer/PC discussions
Geek News and Humour
Web Projects and Services Marketplace
Web Projects
Small projects (quick fixes and changes)
Medium projects (new script, new features, etc)
Large Projects (new web application, complex features etc)
Unknown sized projects (request quote)
Vacant job positions
Looking for work/ for hire
Project collaboration/ partnership
Paid work offers and requests (Now CLOSED)
Career, job, and business ideas or advice
Domains, Sites, and Designs for sale
Domains for sale
Websites for sale
Design templates and graphics for sale
:: Other forums
Forum feedback and announcements
All times are GMT +1. The time now is
01:13 PM
.
Advertisement
Log in to turn off these ads.
Web Hosting UK
|
Dedicated Server Hosting
|
Shareware Junction
|
Software Geek
|
Flash file uploader
|
Cloud Server
|
Web Hosting Australia
Home
-
Contact Us
-
Archives
-
Link to CF
-
Resources
-
Top
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.