Austin's code output for Strings:

Strings Revisited

The string is: -- Now is the time for all good men. --note the spaces before and after the string

The length of the string is: 35

Character (ASCII[32]) -- -- is in position 0
Character (ASCII[78]) --N-- is in position 1 br>Character (ASCII[111]) --o-- is in position 2
Character (ASCII[119]) --w-- is in position 3
Character (ASCII[32]) -- -- is in position 4
Character (ASCII[105]) --i-- is in position 5
Character (ASCII[115]) --s-- is in position 6
Character (ASCII[32]) -- -- is in position 7
Character (ASCII[116]) --t-- is in position 8
Character (ASCII[104]) --h-- is in position 9
Character (ASCII[101]) --e-- is in position 10
Character (ASCII[32]) -- -- is in position 11
Character (ASCII[116]) --t-- is in position 12
Character (ASCII[105]) --i-- is in position 13
Character (ASCII[109]) --m-- is in position 14
Character (ASCII[101]) --e-- is in position 15
Character (ASCII[32]) -- -- is in position 16
Character (ASCII[102]) --f-- is in position 17
Character (ASCII[111]) --o-- is in position 18
Character (ASCII[114]) --r-- is in position 19
Character (ASCII[32]) -- -- is in position 20
Character (ASCII[97]) --a-- is in position 21
Character (ASCII[108]) --l-- is in position 22
Character (ASCII[108]) --l-- is in position 23
Character (ASCII[32]) -- -- is in position 24
Character (ASCII[103]) --g-- is in position 25
Character (ASCII[111]) --o-- is in position 26
Character (ASCII[111]) --o-- is in position 27
Character (ASCII[100]) --d-- is in position 28
Character (ASCII[32]) -- -- is in position 29
Character (ASCII[109]) --m-- is in position 30
Character (ASCII[101]) --e-- is in position 31
Character (ASCII[110]) --n-- is in position 32
Character (ASCII[46]) --.-- is in position 33
Character (ASCII[32]) -- -- is in position 34


The first occurance of 'l' is in position 22

The first occurance of 'd' is in position 28

Place the string Now is the time for all good men. into the second index of an array
The string located at the second index of the array is: Now is the time for all good men.
The third character of the Now is the time for all good men. string at the second index of the array is: w

Explode the string  Now is the time for all good men.  into an array
    
Array ( [0] => [1] => Now [2] => is [3] => the [4] => time [5] => for [6] => all [7] => good [8] => men. [9] => )

Code follows

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Strings Revisited Example</title>
    <link rel="stylesheet" href="css/styles.css">
</head>
<body>

<div class="page">

    <p class="nav"><a href="../index.php">Home</a></p>


    <h1>Austin's code output for Strings:</h1>
    <h2>Strings Revisited</h2>
    The string is: -- Now is the time for all good men. --note the spaces before and after the string
    <br><br>
    The length of the string is: 35
    <br><br>Character (ASCII[32]) -- -- is in position 0
    <br>Character (ASCII[78]) --N-- is in position 1
    br>Character (ASCII[111]) --o-- is in position 2
    <br>Character (ASCII[119]) --w-- is in position 3
    <br>Character (ASCII[32]) -- -- is in position 4
    <br>Character (ASCII[105]) --i-- is in position 5
    <br>Character (ASCII[115]) --s-- is in position 6
    <br>Character (ASCII[32]) -- -- is in position 7
    <br>Character (ASCII[116]) --t-- is in position 8
    <br>Character (ASCII[104]) --h-- is in position 9
    <br>Character (ASCII[101]) --e-- is in position 10
    <br>Character (ASCII[32]) -- -- is in position 11
    <br>Character (ASCII[116]) --t-- is in position 12
    <br>Character (ASCII[105]) --i-- is in position 13
    <br>Character (ASCII[109]) --m-- is in position 14
    <br>Character (ASCII[101]) --e-- is in position 15
    <br>Character (ASCII[32]) -- -- is in position 16
    <br>Character (ASCII[102]) --f-- is in position 17
    <br>Character (ASCII[111]) --o-- is in position 18
    <br>Character (ASCII[114]) --r-- is in position 19
    <br>Character (ASCII[32]) -- -- is in position 20
    <br>Character (ASCII[97]) --a-- is in position 21
    <br>Character (ASCII[108]) --l-- is in position 22
    <br>Character (ASCII[108]) --l-- is in position 23
    <br>Character (ASCII[32]) -- -- is in position 24
    <br>Character (ASCII[103]) --g-- is in position 25
    <br>Character (ASCII[111]) --o-- is in position 26
    <br>Character (ASCII[111]) --o-- is in position 27
    <br>Character (ASCII[100]) --d-- is in position 28
    <br>Character (ASCII[32]) -- -- is in position 29
    <br>Character (ASCII[109]) --m-- is in position 30
    <br>Character (ASCII[101]) --e-- is in position 31
    <br>Character (ASCII[110]) --n-- is in position 32
    <br>Character (ASCII[46]) --.-- is in position 33
    <br>Character (ASCII[32]) -- -- is in position 34
    <br><br><br>The first occurance of 'l' is in position 22
    <br><br>The first occurance of 'd' is in position 28
    <br><br>Place the string  Now is the time for all good men.  into the second index of an array
    <br>The string located at the second index of the array is:  Now is the time for all good men.
    <br>The third character of the  Now is the time for all good men.  string at the second index of the array is: w
    <br><br><pre>Explode the string  Now is the time for all good men.  into an array
    <br>Array
(
    [0] =>
    [1] => Now
    [2] => is
    [3] => the
    [4] => time
    [5] => for
    [6] => all
    [7] => good
    [8] => men.
    [9] =>
)
</pre>

    <hr>

    <h2>Code follows</h2>

    <div class="code"><?php highlight_file(__FILE__); ?></div>

    <p class="nav nav-foot"><a href="../index.php">Home</a></p>

</div>

</body>
</html>