SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict rwar's Avatar
    Join Date
    Sep 2001
    Location
    PF / RS / BR
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    script with php AND html or just php?

    I have some scripts that uses, in most part of it, php functions and, in just a little part, html tags - to show the results from de operations I did on it (from math operations, in most part). Which is better: write html to the parts which I have to show the results or let the script all in 'pure' php?

    Thanks.
    php? mysql? apache? That's it.

  2. #2
    ********* obeah makeda's Avatar
    Join Date
    Jun 2001
    Location
    rollin' on dubs
    Posts
    492
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you're asking whether its better to insert your php values into existing html tags or to write out a string which includes your html tags, i would say go with the first if you're concerned with performance. Something like:

    <tr><td><?=$youValue ?></td></tr>

    should be faster than this:

    <?="<tr><td>$youValue</td></tr>" ?>

    If you're not concerned with speed, then do whatever is easiest.

  3. #3
    SitePoint Addict rwar's Avatar
    Join Date
    Sep 2001
    Location
    PF / RS / BR
    Posts
    207
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just a question: did you do a performance test? Or did you see any site with this performance? Isn't too work to put all separate?

    Thanks for reply, makeda.
    php? mysql? apache? That's it.


Bookmarks

Posting Permissions

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