...

View Full Version : get array value



Jt107
06-13-2011, 07:34 PM
Please advice how could I get the value of phone number and language name from the following: I want to display all elements in a table.
http://ria.dzone.com/sites/all/files/Figure7_2.png

Thanks.

Jt107
06-13-2011, 08:26 PM
Here is the solution:
<cfloop array="#employees#" index="i">
<tr>
<td>#i.getEmp_ID()#</td>
<td>#i.getFirstName()#</td>
<td>#i.getLastName()#</td>
<td>#i.getSalary()#</td>
<td>#i.getDepartment().getDEPT_NAME()#</td>
<td>&nbsp;
<cfloop array="#i.getPhoneNumbers()#" index="j">
(#j.getareaCode()#) #j.getphoneNumber()#
</cfloop>
</td>
<td>&nbsp;
<cfloop array="#i.getLanguages()#" index="k">
<li>#k.getname()#
</cfloop>
</td>
</tr>
</cfloop>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum