How do I find the Delta of a CCK Multivalue Field I have two unlimited multi-value cck fields in one content type: field_before and field_after . In my custom node template file, I need to match up the deltas of each before and after value so I can display my content like this:

Before 0
After 0
------
Before 1
After 1
------
Before 2
After 2


So how do I get this output in my node.tpl file?
I would suggest putting this in a node-TYPE.tpl.php instead of node.tpl.php unless this is your only content type, but anyway, here is a quick start to accomplishing what you asked for using a simple for loop:

&lt;?php $max = max(count($node-&gt;field_before), count($node-&gt;field_after)); ?&gt;
&lt;?php for ($i = 0; $i &lt; $max; $i++): ?&gt;
  &lt;div class='before'&gt;Before &lt;?php print !empty($node-&gt;field_before[$i]) ? $node-&gt;field_before[$i]['view'] : ''; ?&gt;&lt;/div&gt;
  &lt;div class='after'&gt;After &lt;?php print !empty($node-&gt;field_after[$i]) ? $node-&gt;field_after[$i]['view'] : ''; ?&gt;&lt;/div&gt;
  &lt;?php if ($i != ($max - 1)): ?&gt;
    &lt;div class='separator'&gt;------&lt;/div&gt;
  &lt;?php endif; ?&gt;
&lt;?php endfor; ?&gt;


This can obviously be tweaked to add a default value if a field lengths are different, or skip the checking if you know that each "before value" will have a corresponding "answer value".  

Also, if using default "unlimited fields", a user could rearrange them via drag and drop and potentially screw up your data.  If this is a concern for you, you may want to look at Multigroup for CCK3.