PHP4 Broke this - Suggestions?

From: Date: Fri, 20 Oct 2000 15:16:10 +0000
Subject: PHP4 Broke this - Suggestions?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-21413@lists.php.net to get a copy of this message
This worked fine in PHP3, and stopped working in PHP4. Actually, this is a diagnostic copy of a different class with the names changed to protect the innocent . :) But the code below worked in PHP3. Sorry for the silly names - I had to blow some steam... class BooBoo { var $common = array( anchor => "<A%s>%s</A>", ahref => " href=\"%s\"", acontent => "%s" ); function Diddle($ar) { $anchor = $ar["anchor"]; $ahref = $ar["ahref"]; $acontent = $ar["acontent"]; if(isset($ahref) && $ahref){$anattrib = sprintf($this->common["ahref"],$ahref);} if(isset($acontent) && $acontent){$str = sprintf($this->common["acontent"],$acontent);} if($anchor){$link = sprintf($this->common["anchor"],$anattrib,$str); return($link); } } } $jeepers = new BooBoo; $wipme = $jeepers->Diddle($ar=array( anchor => anchor, ahref => $an, acontent => $bn)); echo "$wipme <BR>";

« previous php.general (#21413) next »