PHP Word Scrambled game

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
ravinampad
Forum Newbie
Posts: 2
Joined: Mon Mar 02, 2015 8:07 am

PHP Word Scrambled game

Post by ravinampad »

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?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: PHP Word Scrambled game

Post by requinix »

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
ravinampad
Forum Newbie
Posts: 2
Joined: Mon Mar 02, 2015 8:07 am

Re: PHP Word Scrambled game

Post by ravinampad »

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.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: PHP Word Scrambled game

Post by requinix »

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;
}
Post Reply