Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php loop through string

// Step 1: convert the string to an array using the str_split function

$array = str_split($your_string);

// Step 2: loop through the newly created array

foreach ($array as $char) {
 echo $char;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #loop #string
ADD COMMENT
Topic
Name
9+3 =