Reply to Re: Query on explode()

Your name:

Reply:


Posted by Rik on 10/17/06 00:40

..:[ ikciu ]:. wrote:
> Hmm NurAzije <nurazije@gmail.com> wrote:
>> Try this one, this will work :
>> ---------------------------------------------------
>> $test = explode('-','one-two-three-four-five');
>> $view = new Array();
>> foreach($test as $boo => $foo){
>> $view[$foo] = $foo; // typing error, do it like this
>> }
>>
>> print_r($view);
>
> still too much of lines ... try array_combine

Which Jan-Willem already said, and stated that it doesn't work on PHP < 5.
You seem to miss that the poster is trying to give a solution for PHP4.

About the question why the OP would want an array like this, it's beyond
me. I cannot see any advantage, but then again, I don't know what he's
trying to accomplish

Grtz,
--
Rik Wasmus

[Back to original 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

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