Hi, I am reading an article to create a memory game, and I am stuck with a very simple part (I am not that strong in php). What does the $this->css[] refers to? I usually use it inside a class only and use it to refer the current instance of a object. In this case though, I don't what it means and what it's referring to. Is it like referring to the cards array?
The link is of the article is http://www.webdevplayground.com/2009/09 ... y-and-php/
$cards = array();
for ( $i = 0; $i < $num_of_cards; ++$i ){
$cards[$i] = new Card($card_files[$i]);
$this->css[] = $cards[$i]->get_css_block();
}
Thanks in advance
newbie $this question
Moderator: General Moderators
Re: newbie $this question
you have to download the full example. Is just an array
Code: Select all
class Board
{
private $css = array();
}