You are here: Re: Foreach loop with Array Keys « PHP Programming Language « IT news, forums, messages
Re: Foreach loop with Array Keys

Posted by Rik on 12/12/06 02:24

The.Relinator@gmail.com wrote:
> Never mind, I found the issue, it was just a small spelling mistake.
> I checked it many times and didnt find it until right after I posed
> this!

You can do this easier you know.

$keys = '`'.implode('`,`',array_keys($arry)).'`';
$value = "'".implode("', '",$arry)."'";

BTW, it looks like you're trying to build this for an insert query. If your
variables come from 'outside', be sure to validate them all first!
--
Rik Wasmus

 

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

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