for example,
<form method="post">
<textarea name="content" id="editor"></textarea>
<input type="submit" value="submit" name="alltext">
<form>
Then I type: Humans have ==brain== and it helps them learn things. After that, I want this thing to find the word between == and ==.
$all_text = $_POST["alltext"];
if (a word is between '==' and '==') {
$special_word = the word between '==' and '==';
} else {
do nothing
}
and the output I desire is the variable $special_word
is set to brain
.
It is more like stackoverflow.com where words between # and # is heading 1 and words between ## and ## is heading 2.
Please help me solve this puzzle.