Web Technology II20825 marksCharacter access in strings
Write a program that will read your name as input string. Access and display the individual characters in the name string.
Write a program that will read your name as input string. Access and display the individual characters in the name string. [5]
A PHP string is an indexed sequence of characters, and a single character is reached with square brackets exactly as an array element is, so $name[0] is the first character. strlen() returns the length, therefore a counting loop running from 0 up to strlen($name) - 1 visits every position in turn...