PHP Word Scrambled game
Moderator: General Moderators
-
ravinampad
- Forum Newbie
- Posts: 2
- Joined: Mon Mar 02, 2015 8:07 am
PHP Word Scrambled game
Iam developing a word game . In this , words are scrambled . I have to get jumbled words that should be equal to that of the words in the database. First , I have to get the tile for storing the jumbled words . How get the tile?
Re: PHP Word Scrambled game
I don't know what you're asking.
If this is just a game where you show a scrambled word and the user has to put the letters in the right order,
1. Get any word from the database
2. Split the word into individual letters
3. Shuffle the letters
4. Output the letters in the new order
When the user submits a word,
5. Check if the word matches the one you selected from the database
If this is just a game where you show a scrambled word and the user has to put the letters in the right order,
1. Get any word from the database
2. Split the word into individual letters
3. Shuffle the letters
4. Output the letters in the new order
When the user submits a word,
5. Check if the word matches the one you selected from the database
-
ravinampad
- Forum Newbie
- Posts: 2
- Joined: Mon Mar 02, 2015 8:07 am
Re: PHP Word Scrambled game
Thats right. The correct words are there in the database. You would get the scrambled words i.e jumbled words .But how to show these words in tiles you see in word games like crossword games.
Re: PHP Word Scrambled game
You can use CSS to style a SPAN or DIV to look like a tile. Off the top of my head, something like
Code: Select all
.tile {
display: inline-block;
width: 4em;
height: 10ex;
background: /* beige */;
color: #fff;
border: 2px outset #ccc;
font-weight: bold;
}