Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: get array value

  1. #1
    New Coder
    Join Date
    Nov 2002
    Posts
    29
    Thanks
    1
    Thanked 0 Times in 0 Posts

    get array value

    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.


    Thanks.

  • #2
    New Coder
    Join Date
    Nov 2002
    Posts
    29
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •