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
  1. #1
    Banned
    Join Date
    Mar 2007
    Posts
    1,523
    Thanks
    116
    Thanked 0 Times in 0 Posts

    Question syntax error, unexpected ';'

    PHP Code:
    $mail->MsgHTML("<table>";
    "<thead style=\"backgorund-color:#000; color:#fff;\">";
    "<th>Session Date</th>";
    "<th>Start</th>";
    "<th>Finish</th>";
    "<th>Pallant Session Type</th>";
    "<th>Price</th>";
    "<th>Doctor</th>";
    "</thead>";
    "<tbody>";
    for(
    $k=0;$k<$show_newbookingscount;$k++){
    "<tr>";
    "<td>$show_datebooking[$k]</td>";
    "<td>$show_starttime[$k]</td>";
    "<td>$show_finishtime[$k]</td>";
    "<td>$show_sessiontype[$k]</td>";
    "<td>$show_cost[$k]</td>";
    "<td></td>";
    "</tr>";
    }
    "</tbody>";
    "</table>"); 
    Why? what's wrong?

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    That should be something like
    PHP Code:
    $str="<table>
    <thead style=\"backgorund-color:#000; color:#fff;\">
    <th>Session Date</th>
    <th>Start</th>
    <th>Finish</th>
    <th>Pallant Session Type</th>
    <th>Price</th>
    <th>Doctor</th>
    </thead>
    <tbody>"
    ;
    for(
    $k=0;$k<$show_newbookingscount;$k++){
    $str.="<tr>
    <td>$show_datebooking[$k]</td>
    <td>$show_starttime[$k]</td>
    <td>$show_finishtime[$k]</td>
    <td>$show_sessiontype[$k]</td>
    <td>$show_cost[$k]</td>
    <td></td>
    </tr>"
    ;
    }

    $str.="</tbody>
    </table>"
    ;

    $mail->MsgHTML($str); 
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    jarv (05-26-2011)


  •  

    Posting Permissions

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