Newb here attempting something new (for me)
What I am attempting: I am attempting to create an idea number that iterates with each return, so the incident report for the giant kaiju (strange beast - aka Godzilla and friends) has an individual case number that is created programmatically). This means return one would be #1, return two would be #2, returned 3 would be #3 et al.
What I have done: I've attempted to put my int at the beginning, in the middle, at the end, after the return, etc, but regardless of where I put it, i always get the same number (12). I've read about iterating over at php.net, and looked through stack overflow and other places but i've not found something i could internalize/understand enough to replicate.
function __toString(){
$kID = 1;//kaiju incident number
$myReturn = "<p> Incident ID: kID" . $kID ;
$kID++; //not iterating thru
$myReturn .= $kID ;
$myReturn .= " | Massive Terrestial Organsim Reported: " . $this->movTitle . " " ;
$myReturn .= " | Location Name: " . $this->entWhat. " ";
$myReturn .= " | Severity of Incident Reported: " . $this->movRating . "</p>" ;
return $myReturn;