Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in PHP only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Member List
Calendar
Today's Posts
Home
Forum
Topic
PHP
Variable Declaration
Variable Declaration
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
shobu
New Member
Join Date:
Mar 2007
Posts:
3
#1
Variable Declaration
Apr 29 '07, 07:36 AM
$variablename.= 10
Please explain the use '
.="
mwasif
Recognized Expert
Contributor
Join Date:
Jul 2006
Posts:
802
#2
Apr 29 '07, 10:15 AM
It is same as
[PHP]$variablename = "some value";
$variablename = $variablename . 10;[/PHP]
Comment
Post
Cancel
devsusen
New Member
Join Date:
Feb 2007
Posts:
136
#3
Apr 30 '07, 11:56 AM
Hi,
in php dot(.) is basically the string concatenation operator. so writing
[PHP]$var .= 10; [/PHP]
means,
[PHP]$var = $var . 10[/PHP];
here in this example 10 will be concatenated with the value of $var as string. There will be no mathematical addition if $var also contain number too.
susen
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
👍
👎
☕
Comment