Arrays on Attributes

Permalink
Hi All:

I'm not sure if this has been done before in C5, but I'm trying to create an Array that reads multi-line attributes. I've hit a wall that I'm trying to solve as I'm not too acquainted with arrays.

The objective is this:

Take a page - page A.

Page A has an attribute "address1"

Sometimes, a Page can have multiple addresses, therefore a new attribute can be added "address2" .. "address3" .. "address4" .. "address5" .. etc

All addresses follow the output format

123 ABC St
City, State Zip

Any questions, please ask but this is what I have so far:

for ($i = 0; $i < count($cArray); $i++ ) {
      $addressAtt[$i] = $c->getCollectionAttributeValue('address'.$i); 
      echo '<span>';
      for ($ii = 0; $ii < 4; $ii++ ) {
         echo $addressAtt[$i]->getAttribute('address'.$i);
      }
      echo '</span>';   
   }


Am I on the right track here?

Thanks,
Keith

MavenMedia