Your not using $array1 or $array2 as arrays. Really, your code is quite all over the place.
Also, you should have a separate method responsible for printing. Having a 'setter' also print is just poor design.
<?php
class Foobar {
private $array1 = array();
private $array2 = array();
private $binary = 1;
/*Toy FCN that will append "dog" to 1 and "cat" to -1*/
//param numRuns is how many times to run this FCN
function putInProperArray($numRuns) {
for($i=0;$i<$numRuns;$i++) {
if($this->binary==1) {
$this->array1[] = "dog";
}
else if($this->binary==-1) {
$this->array2[] = "cat";
}
$this->binary*=-1;
}
}
public function print() {
echo implode(' ', $this->array1);
echo implode(' ', $this->array2);
}
}//END CLASS Foobar
$fooBar = new Foobar;
$fooBar->putInProperArray(3);
$fooBar->print();
?>