How do I make the variable item from one PHP file visible to a PHP class that is a different file?
The variable:
$item = "item";
The class:
class Item{
public function getItem(){
$result = $item + 5;
echo $result;
}
}
How do I make the variable item from one PHP file visible to a PHP class that is a different file?
The variable:
$item = "item";
The class:
class Item{
public function getItem(){
$result = $item + 5;
echo $result;
}
}