Hi guys,

Could somebody help me in decrimenting the letters cause code like below exists

$let = 'A';
for($x=1;$x<256;$x++){
    echo $let++.'-';
}
//output: A-B-C-D-E.......
i just wonder how about decrimenting it like $let--; but it didnt work
does anayone has the idea on how to generate $let--

thanks,

Have you thought of trying something like:

$alphabet = range('A', 'Z');

for($x = 0; $x < 256; $x++) {
    $i = ($x <= 25)  ? $x : $x % 26;
    echo $alphabet[$i] . '-';
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.