• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Problem mit explode

T!P-TOP

Mitglied
Hey,

nehmen wir an ich rufe eine Datei auf und gebe folgenden Parameter an: ?name=css+css1+css2+css3+css4

Nun möchte ich mittels explode die css-Namen in Array Elementen unterbringen:

PHP:
$css = explode('+', trim((string)$_GET['name']));

Und bei...

PHP:
print_r($css);

...erhalte ich:
Array ( [0] => css css2 css3 css4 )


Was mache ich falsch? Das Array sollte doch theoretisch so aussehen:
PHP:
Array (     [0] => css [1] => css2 [2] => css3 [3] => css4 )



Grüße
 
Das Plus zeichen in Querystrings ist reserviert, es wird immer in ein Leerzeichen umgewandelt.
http://www.ietf.org/rfc/rfc1630.txt schrieb:
Within the query string, the plus sign is reserved as shorthand notation for a space. Therefore, real plus signs must be encoded. This method was used to make query URIs easier to pass in systems which did not allow spaces.
 
Zurück
Oben