Here's what I got thus far, please guide me thru this:
Code:
<?php
$con = mysql_connect("localhost","numbers","numbers");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("numbers", $con);
$gxlc_db = mysql_query("SELECT ccodes FROM original limit 2000") or die(mysql_error());
while($gxlc = mysql_fetch_array($gxlc_db)) {
$ccode = $gxlc['ccodes'];
for each $ccode[]
for each line in group
set digitarray to 0
for each column in line
set digitarray.columndigit to 1
end of column loop
end of line loop
set outstring to null
set digitarray.10 to 0 to simplify logic
for each digit from 0 to 9
if digitarray.digit = 0 then iterate
else set temp to digit
for digit from digit+1 to 9
if digitarray.digit = 0 then leave innerloop
else temp = temp || digit2
end of inner digit loop
if length(temp) > 2 then temp = "[" || left(temp,1) || "-" right(temp,1) || "]"
outstring = outstring || temp
end
end outer digit loop
output outstring || "."
end of group loop
Obviously the above doesn't work, am not sure how to get this work at all, please help...