Page 2 of 2

Posted: Tue Feb 27, 2007 2:56 pm
by Luke
Kieran Huggins wrote:NSG: Those are some niceforms ;-)
:wink:

Posted: Tue Feb 27, 2007 4:15 pm
by spamyboy
Kieran Huggins wrote:it works best when the ascenders and descenders are in the correct places as well

NSG: Those are some niceforms ;-)

Code: Select all

<?php
if($_POST['text']) {
$text=$_POST['text'];
$text = explode(" ", $text);
foreach( $text as $word )
{
$word_long=strlen($word)-2;
$first_letter=substr($word, 0, 1);
$random_letters=substr($word, 1, $word_long);
$random_letters=str_shuffle($random_letters);
$last_letter=substr($word, -1, 1);
$word=$first_letter.$random_letters.$last_letter;
$new_words[] = $word;
}
$text = implode(" ", $new_words);
echo $text;
}
?>
So could anyone help with this ?

Posted: Tue Feb 27, 2007 5:18 pm
by daedalus__
For it to be encoded, you would have to be able to decode it, wouldn't you?

Posted: Tue Feb 27, 2007 5:26 pm
by Luke
spamyboy, be patient! :evil:

Posted: Sun Mar 04, 2007 7:24 am
by spamyboy
bump

Posted: Mon Mar 05, 2007 6:04 am
by Kieran Huggins
make the word an array, copy the letters that have ascenders to one array, copy the letters that have descenders to another array, and copy the rest to a third array. Jumble each array, then replace them in the order you fetched them from: ascender over ascender, descender.... you get the picture.