Results 1 to 2 of 2

Thread: An activity I can't figure it out.

  1. #1
    Join Date
    Dec 2002
    los angeles

    An activity I can't figure it out.

    I'm reading php, mysql and apache in 24 hours'. They have you do activities at the end of the chapter. So far i've been able to do them, but i'm having trouble on this one.

    Create a function that accepts four string variables and returns a string that contains an html table element, enclosing each of the variables in its own cell.
    How do you do this?

  2. #2
    Join Date
    Dec 2002
    WI, United States
    Try using something like this:
    PHP Code:
    function addTable($one$two$three$four){
    $data "<table><tr>\n";
    $data .= "<td>$one</td>\n";
    $data .= "<td>$two</td>\n";
    $data .= "<td>$three</td>\n";
    $data .= "<td>$four</td>\n";
    $data .= "</tr></table>\n";
    That should work for you.
    if (succeed != true)
    function askAdam();

    Check out my site!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles