Reply to single array to multidimensional

Your name:

Reply:


Posted by frizzle on 06/22/06 16:24

Hi there,

I have a string, comma separated, with links and their respective URLs
in it. Example:
Google,http://www.google.com,Yahoo!,http://www.yahoo.com,WikiPedia,http://www.wikipedia.org

etc, etc.

i make an array of this with explode( ',', $string );

now what i wonder is how can i turn this array into something like
this:

$array[0]['name'] = Google
$array[0]['url'] = http://www.google.com
$array[1]['name'] = Yahoo!
$array[1]['url'] = http://www.yahoo.com
$array[2]['name'] = WikiPedia
$array[2]['url'] = http://www.wikipedia.org

I hope/think this is all clear ...

Frizzle.

[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

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