Return to Snippet

Revision: 45847
at May 9, 2011 21:43 by ksnagra


Updated Code
$string = "Your String";
for($i=0;$i<strlen($string);$i++){
		$char = substr($string,$i,1);
}

Revision: 45846
at May 9, 2011 21:43 by ksnagra


Updated Code
$string = "test";
for($i=0;$i<strlen($string);$i++){
		$char = substr($string,$i,1);
}

Revision: 45845
at May 9, 2011 21:41 by ksnagra


Initial Code
$string = "test";
for($i=0;$i<strlen($string);$i++){
$char = substr($string,$i,1);
}

Initial URL

                                

Initial Description
Simple PHP for loop to display / check each character within a string variable.

Initial Title
loop through string using PHP

Initial Tags

                                

Initial Language
PHP