I'm not good at preg thingy, but I found a function called preg_split.
Let's say I have the string: "word1
& lt; & Gt;
How do I do it in the preggae?
My code: $ extractedWord = preg_split (& lt; pattern & gt ;, 'wORD1 & lt;> WORD2 & lt;> word3 & Lt;> word4 ");
If you use preg_split () instead Trying Explosion () or other php function whose same result is function
$ extractedWord = "word1" and <; Word2 & lt; & Gt; Word 3 & lt; & Gt; Word4 "; // values" & lt; & Gt; $ Result = preg_split ("/> The generated output will be:
Array ([0] => 1 [1] => 2 [2] = & Gt; word 3 [3] = & gt; word4)
No comments:
Post a Comment