I am trying to split a text into an array using explode, but for some reason that does not work when the text is coming from a posted form.
If I run explode('|§|', 'qwe|§|asd|§|zxc');
I will get an array like:
Array
(
[0] => qwe
[1] => asd
[2] => zxc
)
BUT
If this input text comes from a form define like:
<form method="post">
Input: <input type="text" name="query" size="50" value="qwe|§|asd|§|zxc"><input type="submit" value="Parse">
</form>
I am getting the following array:
Array
(
[0] => qwe|§|asd|§|zxc
)
Im guessing this has to do with iso settings and that the text in the 'query' field has been altered in some way, but I can't understand how to fix. I have tried setting <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" />
and other charsets, but to no avail.
Any ideas? Thanks in advance.