stof01 Posted May 10, 2009 Share Posted May 10, 2009 Hi Im having some trouble trying to do the following... My first page will have a text box where a user can enter no less than a hundred words.The user clicks submit and it gets passed into array and the next page displays the word cloud. Any help would be great Quote Link to comment https://forums.phpfreaks.com/topic/157595-word-cloud/ Share on other sites More sharing options...
ohdang888 Posted May 10, 2009 Share Posted May 10, 2009 too vague of problem. Post errors, what's happening, whats your code. We can't help you with what you gave us Quote Link to comment https://forums.phpfreaks.com/topic/157595-word-cloud/#findComment-831015 Share on other sites More sharing options...
chronister Posted May 10, 2009 Share Posted May 10, 2009 Sounds like your trying to get a tag cloud going. There are hundreds to thousands of tutorials showing you how to do that. But your actual question is a straight forward textarea form that takes the words and breaks them up into an array like so.... <?php if(isset($_POST['submitForm'])){ $words = explode(',', $_POST['words']); echo '<pre>'; print_r($words); echo '</pre>'; } ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> <label>Enter your tags/words. Seperate them with a comma (,).<br /> <textarea name="words" cols="80" rows="8" id="words" ></textarea><br /> </label> <input type="submit" name="submitForm" value="Submit Words" /> </form> results look like this. Array ( [0] => bob [1] => steve [2] => john [3] => dog [4] => cat [5] => bird [6] => car [7] => this [8] => that [9] => cake [10] => face [11] => grass [12] => pot [13] => pan [14] => dish [15] => baby [16] => joe [17] => van [18] => bus [19] => form [20] => field [21] => button [22] => cat ) Nate Quote Link to comment https://forums.phpfreaks.com/topic/157595-word-cloud/#findComment-831246 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.