Welcome Guest [Log In] [Register]
This board has been archived and is no longer accepting new questions. If you have a support question for your ZetaBoard, please visit us at the new support board. Registration is free and easy.


Visit the NEW ZetaBoards Support forum!

Username:   Password:
Add Reply
Array for all characters?
Topic Started: May 8 2008, 02:08 PM (484 Views)
Viral
Member Avatar
i'm stanley nao
[ *  *  *  *  * ]
Basically, I need an array in this PHP file I am creating. It needs to contain every single character (case sensitive) in the array, preferably in order.

Does anyone know where I would find this?


EDIT:

When using:

Code: HTML
 
<?php

$r = range(65,90);
foreach ($r as $ascii) {
$arr[] = chr($ascii);
}
$r2 = range(97,122);
foreach ($r2 as $ascii) {
$arr[] = chr($ascii);
}

for($i=0;$i<count($arr);$i++){
echo $arr[$i];
}

?>


I get all 26 letters in both cases. That's what I want, but I also need punctuation, accented letters etc.

How would I go about doing that?


EDIT:

Code: HTML
 
<?php

$r = range(32,126);
foreach ($r as $ascii) {
$arr[] = chr($ascii);
}

for($i=0;$i<count($arr);$i++){
echo $arr[$i];
}

?>



I'm using that now, but that doesn't include accented characters.

Offline Profile Quote Post Goto Top
 
spartan09
Member Avatar
Me.
[ *  * ]
http://www.4d.com/docs/CMU/CMU10121.HTM

You probably just wanna go through #159. That should do the trick.
Offline Profile Quote Post Goto Top
 
Chris
Member Avatar
Member
[ *  *  *  * ]
What do you need it for, exactly?
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Coding & Modifications · Next Topic »
Add Reply