PHP: Tips and Tricks for Building Modern PHP Apps by Pratt Logan

PHP: Tips and Tricks for Building Modern PHP Apps by Pratt Logan

Author:Pratt, Logan [Pratt, Logan]
Language: eng
Format: epub
Published: 2020-08-01T16:00:00+00:00


}

class ChildClass extends ParentClass {

public function theprefixName($vname, $theseparator = ".", $vgreet = "My dear ") {

if ($vname == "John Snow") {

$theprefix = "Mister.";

} else-if ($vname == "Jane Snow") {

$theprefix = "Mrs.";

} else {

$theprefix = "";

}

return "{$vgreet} {$theprefix}{$theseparator} {$vname}";

}

}

$class = new ChildClass;

echo $class->theprefixName("John Snow");

echo "<br>";

echo $class->theprefixName("Jane Snow");

?>

</body>

</html>



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.