$string = "k1:k2:k3:...:kn"; $array = explode(":", $string);
//Contents of $array is now: // Array // { // [0] => k1 // [1] => k2 // [2] => k3 // ... // [n-1] => kn // } Avast! Daniel Roesler diaf...@gmail.com On Thu, Feb 5, 2009 at 4:40 AM, Hans <desi...@softflow.co.uk> wrote: > Perhaps someone can help me out with this problem: > > I got a string k1:k2:k3:....:kn and a value val > made up of alpha-numeric word strings of any length > k1 ..kn, seperated by : > The number n of the k members can vary. > > I like to construct an array out of this like > array[k1][k2][k3]....[kn] = val > so each word string k will become a key of the array, in sequence of > the original series, resulting in an array with n keys. > > Apologies for the shorthand leaving out $ and quotes for proper php. > > > Thanks for any help! > Hans > > > _______________________________________________ > pmwiki-devel mailing list > pmwiki-devel@pmichaud.com > http://www.pmichaud.com/mailman/listinfo/pmwiki-devel > _______________________________________________ pmwiki-devel mailing list pmwiki-devel@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-devel