Accessing private variable from static function in php

Viewed 15525

I've got a private variable in my class

private $noms = array(
        "HANNY",
        "SYS",
        "NALINE"
);

I want to access it from a static method:

public static function howManyNom($searchValue){

        $ar = $this->noms;

        foreach($ar as $key => $value) {

...

But as normal I cant retrieve it with $this because there's no instance on a static method.

What's the right syntax to get $noms inside my static function?

3 Answers
Related