View Full Version : how to build php pages from layout
05-05-2008, 06:31 AM
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
use php to insert data between the components link
Insertcontent("div--content" , $data)
05-05-2008, 06:52 AM
Not sure why you posted this here and not PHP forum but ok...
Well considering your second option is not really a function (http://us.php.net/manual-lookup.php?pattern=insertcontent)of php, your bet would be to just include (http://us.php.net/manual/en/function.include.php) pages and print (http://us.php.net/manual/en/function.print.php) or echo (http://us.php.net/manual/en/function.echo.php) the data..
05-05-2008, 07:53 AM
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
should i use php to build that layout and then put data in it , as i have the html template of the design
05-05-2008, 05:43 PM
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.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.