While Doesn' work

Hi folks, for some reason I can't seam to find where the error is, I know it is a logical error since I'm getting an infinite loop, but I'm just stranded in finding it...

$dia = 1;
	$diaCount = 1;
	$countCapitulo = 1;
			if($diaCount != 16){
				//	if($diaCount != 23){
							$countCapitulo = $countCapitulo++;
							echo "<a href=\"$final\">CapĂ­tulo: $countCapitulo</a>";
							echo "\n";
							echo "<br/>";
				//	};
			$dia = $dia++;			
			$diaCount = $diaCount++;

Open in new window

Any help would be greatly appreciated.
Rodric MacOliverResearcherAsked:
Who is Participating?
Ray PaseurConnect With a Mentor Commented:
Please try changing this line:

$diaCount = $diaCount++;

to this:

Ray PaseurCommented:
Or you could change it to this (assuming you want a one-step iterator)

$diaCount = $diaCount + 1;
Rodric MacOliverResearcherAuthor Commented:
Cheers Ray, as usual you really came through for me.

I simply couldn't see it, probable from programming during the wee hours of the night...
Anyway cheers!
Ray PaseurCommented:
Glad to help, I've had a good night's sleep :-)

Thanks for the points and thanks for using EE, ~Ray
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.