HosipLan

Untitled

May 14th, 2012
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. foreach ($it = new Nette\Iterators\CachingIterator($product->attributes) as $attributeValue) {
  2.     if ($it->first || $it->nextValue->attribute->name !== $attributeValue->attribute->name) {
  3.         echo $attributeValue->attribute->name, ': ';
  4.     }
  5.  
  6.     echo $attributeValue->value, ', ';
  7. }
Advertisement
Add Comment
Please, Sign In to add comment