RE: [PHP] overriding string concatenation '.'

This is a discussion on RE: [PHP] overriding string concatenation '.' within the PHP General forums, part of the PHP Programming Forums category; CPT John W. Holmes <mailto:holmes072000@charter.net> on Wednesday, November 12, 2003 10:43 AM said: >&...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-12-2003
Chris W. Parker
 
Posts: n/a
Default RE: [PHP] overriding string concatenation '.'

CPT John W. Holmes <mailto:holmes072000@charter.net>
on Wednesday, November 12, 2003 10:43 AM said:

>> The dots in ipaddr variable are considered to be
>> string concatenations.

>
> No they are not. Show some examples.


What am I missing here? How is the dot operator not considered
concatenation?

$concatenatedString = 'a'.'concatenated'.'string';

tirumal,

Do you want do to this?

$string = "ssh.$ipaddr.command";

?



Chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/
Reply With Quote
  #2 (permalink)  
Old 11-12-2003
Cpt John W. Holmes
 
Posts: n/a
Default Re: [PHP] overriding string concatenation '.'

From: "Chris W. Parker" <cparker@swatgear.com>
> > CPT John W. Holmes <mailto:holmes072000@charter.net>
> > > The dots in ipaddr variable are considered to be
> > > string concatenations.

> >
> > No they are not. Show some examples.

>
> What am I missing here? How is the dot operator not considered
> concatenation?
> $concatenatedString = 'a'.'concatenated'.'string';


We know periods are for concatination, but periods _within_ strings are not.

$ipaddr = "122.122.122.122";
$str = 'a'.$ipaddr.'string';

From the way I read that, the periods _within_ $ipaddr were being seen as
concatination characters (according to OP), which doesn't make sense. So I
wanted an example.

---John Holmes...
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:42 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0