albumContainer.php
class that stores Album objects in an array
php
<?php
require("album.php");
class albumContainer
{
public $Albums = [];
public function __construct()
{
for($i = 0; $i < 3; $i++)
{
for($j = 0; $j < 3; $j++)
{
$this->Albums[] = new Album;
}
}
}
public function render()
{
for($i = 0; $i < 3; $i++)
{
for($j = 0; $j < 3; $j++)
{
echo $this->Albums[$i + $j]->pass()." ";
}
echo "<br/>";
}
}
}
?>
Raw
Added: 3/29/2018
Expires: Undefined