Could someone show me how I can do this or if it isn't possible then to show me another way?
Im trying to get the description that the user typed in and slice away some words and then get the first word and search if there is another word in my database just like it in the description of a word associated with that word
This whole thing is sort of like a dictionary
$word = (isset($_POST['word']) ? $_POST['word'] : null);
$description = (isset($_POST['description']) ? $_POST['description'] :
null);
echo "<br>" . "<br>";//this is why its showing
$Slicer = array( ' a ', 'A ', 'The ', ' the ', ' an ', ' this ', ' that
',
' these ', ' those ', ' my ', ' your ', ' his ', ' her ', ' its ',
' it\'s ', ' our ', ' their ', ' few ', ' little ', ' much ', ' many ',
' lot ', ' of ', ' most ', ' some ', ' any ', ' enough ', ' all ', '
both ',
' either ', ' neither ', ' each ', ' every ', ' other ', ' another ',
' Here ', ' I ', ' me ', ' mine ', ' myself ', ' i ',
' you ', ' your\'s ', ' yourself ', ' he ', ' him ', ' his ',
' himself ', ' she ', ' her\'s ', ' herself ', ' itself ',
' we ', ' us ', ' our ', ' ours ', ' ourselves ', ' yourselves ',
' they ', ' them ', ' theirs ', ' themselves ', ' no ', ' none ',
' not ', ' any ', ' few ', ' few ', ' several ', ' great ', ' deal ',
' lot ', ' lots ', ' large ', ' amount ', ' plenty ', ' more ',
' fewer ', ' fewest ', ' less ', ' least ', ' what ', 'she\'s',
'the ', ' to ', ' for ', ' something ', ' or ', ' used ',
' represent ', ' in ', ' by ', ' are ', ' often ', ' called ', 'a ',
'.');
$sliced = str_replace($Slicer,' ',$description);
echo $sliced;
echo "<br>";
$SWords = (explode(" ",$sliced));
echo "<br>";
$FirstWord = $SWords[1];
echo "<br>";
echo $FirstWord;
echo "<br>";
$test = "test";
$sql = "SELECT * FROM WordDatabase WHERE description LIKE '"
.$FirstWord."'";
I have more code and Im connected to my database and everything