You are here: function to extract key/value pairs? « PHP Programming Language « IT news, forums, messages
function to extract key/value pairs?

Posted by Stan McCann on 10/25/06 21:50

I've searched and searched for a function to create an array from a
string maintaining key/value pairs and keep coming up blank. This
seems to me that it would be quite commonly used.

What I am doing is trying to pass an array using $_GET. To pass the
array, it is rather simple to add it to my get string breaking the
array into key,value,key,value,key,value. The problem is reading it
back into an array. I've tried explode but that places each key and
value as a value in an array. I've tried split and think it might work
except it chokes if there is only one key/value. Is there a function
to do what I want or is there a better way to pass an array?

--
Stan McCann, RETIRED!!, "Uncle Pirate" http://stanmccann.us/
Implementing negative score for googlegroup postings, see
http://blinkynet.net/comp/uip5.html
A zest for living must include a willingness to die. - R.A. Heinlein

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация