string to associative array

From: Date: Wed, 18 Oct 2000 13:05:26 +0000
Subject: string to associative array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-20885@lists.php.net to get a copy of this message
Hey there: What's the most efficient way to expand: "var1=123|var2=456|var3=789" into an associative array, like: $array1["var1"] = 123 $array1["var2"] = 456 $array1["var3"] = 789 is there a quicker way than doing two explodes and then some sort of loop to build it? -- Marc Antony Vose http://www.suzerain.com/ Into every tidy scheme for arranging the pattern of human life, it is necessary to inject a certain dose of anarchism. -- Bertrand Russell

« previous php.general (#20885) next »