Here's my problem, i have created an HTML interface for a site, and there is also PHP code. my job is to put both together. i am a complete PHP noob, i've never worked with it. so basically what i was told, is to put the Interface and the PHP together. How would i go about doing that?
thanks!
<-- complete noob - Ques. on PHP and HTML integration
Moderator: General Moderators
it would help if i saw the two.. being a reative newb myself....
here's my suggestion:
<?php
/*php stuff you were given */
?> html stuff for the page
then look at what needs to cross.. ie: we get the page title fromthe php.. ok... then in the html, instead of <title>blahblahblah</title>
use <title><?php echo $php title info; ?>
i hope that helps some
here's my suggestion:
<?php
/*php stuff you were given */
?> html stuff for the page
then look at what needs to cross.. ie: we get the page title fromthe php.. ok... then in the html, instead of <title>blahblahblah</title>
use <title><?php echo $php title info; ?>
i hope that helps some
If you have a .php script that has HTML in it, and you need to basically fill in some sections of the HTML with variable values, cut out the old static text, and replace it with
or
And then continue on with the HTML. Note that $variable has to be a real variable, containing the text you want to insert into the HTML at that point.
Code: Select all
<?php
echo $variable;
?>Code: Select all
<?=$variable?>