Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Characters

$
0
0

I want to create a decoding tool.  To do this, I want to create a database with every character in the db, and each character would have up to 255 possibilities for each character.

 

The problem that I'm having is I want to automatically write each character into the database including special characters like single quotes, double quotes, and open parenthesis.

 

I thought about trying something like this:

$characters = Array( A,B,C,......);
 
foreach ($characters as $c){
  < pull the characters >
  < generate random code >
  < write to db >
}

But of course, certain characters like ")" cause a problem in an array.  I thought maybe I could do it by character string or something like that, but I can't seem to find any code examples of that.

 

Any suggestions?

 

Thanks.


Viewing all articles
Browse latest Browse all 13200

Trending Articles