Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #5547

$this->delimiter in php explode

From j <mung_me@att.net>
Newsgroups comp.lang.php
Subject $this->delimiter in php explode
Date 2012-04-16 21:45 -0400
Organization albasani.net
Message-ID <jmihvb$cna$1@news.albasani.net> (permalink)

Show all headers | View raw


   I've written a function in a class

public $delimiter = ';';

...

public function some_function(){
	echo $this->delimiter; // yields: ;
	$SOME_ARRAY= explode($this->delimiter,$some_string);

	echo $this->delimiter // yields: 1

So,  running explode changes the value of the class variable $delimiter. 
It's obvious I'm stepping on something, but I'm not sure what other than 
there is a delimiter in explode. What does $this mean inside the explode 
function?

  Jeff

Back to comp.lang.php | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

$this->delimiter in php explode j <mung_me@att.net> - 2012-04-16 21:45 -0400
  Re: $this->delimiter in php explode Jerry Stuckle <jstucklex@attglobal.net> - 2012-04-16 22:08 -0400
  Re: $this->delimiter in php explode "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-04-17 09:26 +0200

csiph-web