PHP – Loop Through String

This given PHP example for loop to display / check each character within a string variable.

Code Example:

$string = "Your String for Loop";
		$char = substr($string,$i,1);
		echo "$char <br>";

Post to Twitter Post to Digg Post to Facebook Post to Google Buzz Send Gmail

Leave a Comment

Your email address will not be published. Required fields are marked *