help on array

Discussion in 'Programming' started by commando1, Oct 12, 2011.

  1. #1
    Good day everyone, please i can display image records as follow in coldfusion
    and now i want display it using an array any help please.
    below is the code
    
    <cfquery name="result" datasource="mydsn">
    
    SELECT name,age,sex FROM data_record
    </cfquery>
    <h1><font color=green>data successfully selected</font></h1> 
    <cfoutput>
    <b>Your Name is</b> #name#<br>
    <b>Yoour age is</b> #age#<br>
    </cfoutput>
    
    Code (markup):


    Finally, in php i can do it this way

    
    while($rows=mysql_fetch_array($result)){
    
    ?>
    <b>name</b><? print $rows['name']; ?><br>
    <b>Age:</b><? print $rows['age']; ?><br>
    <b>sex:</b><? print $rows['sex']; ?><br>
    
    
    
    Code (markup):
     
    commando1, Oct 12, 2011 IP