parse_str
| From: | Radu Filip | Date: | Mon, 18 Dec 2000 11:03:25 +0000 |
| Subject: | parse_str | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-30854@lists.php.net to get a copy of this message | ||
Hi!
I have a small "database" which is a text files with rows like this:
name=name_a&description=description_a
name=name_b&description=description_b
...
In a php page I read the file line by line, I split it using parse_str()
and I display the resulting variables, $name and $description.
The problem is if a description contains '+' sign, it is converted to
spaces. I tried using + instead of '+' signs but with no result. I
also tried using split() function but agains, I get spaces for every '+'
sign.
So, how could I split a string that contains '+' signs and preserve
this signs after split?
TIA,
Radu