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 4 of 4
  1. #1
    Senior Coder o0O0o.o0O0o's Avatar
    Join Date
    Jan 2008
    Location
    C:\Windows\System32
    Posts
    1,018
    Thanks
    19
    Thanked 9 Times in 9 Posts

    how to build php pages from layout

    My friend has given me the html templates which contains the layout of the div and tables.

    Now i have to insert data in them .

    Which is the best way to insert data in templates. Should open html file and use echo to update data

    or


    use php to insert data between the components link

    Code:
    Insertcontent("div--content" , $data)
    Please de-reputate me
    0o0o0o0

    Its better to rule in Hell then to serve in Heaven

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Not sure why you posted this here and not PHP forum but ok...

    Well considering your second option is not really a function of php, your bet would be to just include pages and print or echo the data..

  • #3
    Senior Coder o0O0o.o0O0o's Avatar
    Join Date
    Jan 2008
    Location
    C:\Windows\System32
    Posts
    1,018
    Thanks
    19
    Thanked 9 Times in 9 Posts
    The mainnthing which i want to ask was not related to php.

    The basic question is

    should i put data in pre made layout using php
    or

    should i use php to build that layout and then put data in it , as i have the html template of the design
    Please de-reputate me
    0o0o0o0

    Its better to rule in Hell then to serve in Heaven

  • #4
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Ok that makes more sense. Its really up to you and how the site is designed.

    If your data is dynamic, then chances are it won't always fit the mold of the included layout, so just fitting everything into the file might be helpful. This is probably in larger scale projects.

    If your data is more static, then keeping the static pages as html pages which use PHP to include the template items makes sense to me. This is probably smaller scale projects.

    In the end its preference and what works best for the situation.


  •  

    Posting Permissions

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