Results 1 to 3 of 3

Thread: foreach problem very strange...[RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2003
    Location
    In Front of my computer...
    Posts
    367

    Resolved foreach problem very strange...[RESOLVED]

    Code...
    PHP Code:
    echo "<table>";
        foreach(
    $output as $val)
        {
        echo    
    "<tr>";
        echo    
    "<td>";
        echo 
    $val;
        echo    
    "</td>";
        echo    
    "</tr>";
        }
    echo    
    "</table>"
    well i want each array value to be like this...in their own cell
    Code:
    <table>
    <tr>
    <td>
    *value here*
    </td>
    </tr>
    <tr>
    <td>
    *next value*
    ...
    ...
    ...so on
    and with the code above it is supposed to do that!...guess what, It DOESNT!

    it creates a new table a tr a td for each value so i end up having tons of tables :/

    anyone knows what's wrong with it ?...
    Thanks!

    many thanks to visualad he corrected me...
    THREAD RESOLVED!
    Last edited by EJ12N; Apr 16th, 2005 at 04:55 PM.
    Born to help others
    (If I've been helpful then please rate my post. Thanks)

    call me EJ or be slapped!

Posting Permissions

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



Click Here to Expand Forum to Full Width