You are here: Re: How to remove row from ezSQL object? « PHP Programming Language « IT news, forums, messages
Re: How to remove row from ezSQL object?

Posted by deko on 02/27/07 22:09

> ezSQL aside, I think the issue is removing an item from an object in PHP

I tried this:

foreach ($category as $cat_item)
{
echo $cat_item->cat_name;
foreach ($itemdata as $item_datum)
{
if ($item_datum->category_id == $cat_item->cat_id)
{
echo '--'.$item_datum->item_name;
array_splice($itemdata, current($itemdata), 1);
}
}
};

which sees to work, but not accurately... if the matched item_datum is the first
in the array, the second element is removed.

 

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

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