I am running an expect script that brings back the following:
34 35 13 56 98 121 9 89 114 53
62 3 124 1 20 7 65 18 11 70
132 39 102 95 106 150 111 25 129 14
16 77 15 130 32 48 112 110 72 33
43 31 60 100 120 2 64 58 28 118
17 76 105 115 80 73 23 125 87 6
61 103 81 91 68 93 84 99 51 8
92 101 90 36 54 10 127 86 116 4
29 69 94 37 104 128 123 40 57 117
122 42 44 109 113 126
exec($suCmd,$result,$rval);
for ($i = 0; $i < sizeof($result); $i++) {
echo "$result[$i]<br>";
}
What I want is to split the numbers above into variables or
an array and then spin through them.
So, instead of printing 1 line out at a time, I would
print 1 number out at a time like this:
echo "<a href=myphp.php?su=" . $result[$i];
So the output is:
34
35
13
I could probably pass the expect script to a shell then parse it there but
would rather just run it from php and parse the results without having to use
a shell script.
Thanks,
Eric