addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1linklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Re: [houston-php] Mix html with php vs php string.

From: Chris O.
Sent on: Tuesday, October 12, 2010 6:04 PM
#1

There are cases when you want to use something like #2, but in general PHP code should look like PHP and HTML should look like HTML.

-- Chris

On Tue, Oct 12, 2010 at 5:50 PM, Jonny Nguyen <[address removed]> wrote:
I need your input regarding mix html with php or just create a php string. See example below.

1. Html mix with php
<html>
<head></head>
<body>
<h3><?php echo 'Hello World'; ?></h3>
</body>
</html>

2. php string
<?php
strhtml = '<html>';
strhtml .= '<head></head>';
strhtml .= '<body>';
strhtml .= '<h3>Hello World</h3>';
strhtml .= '</body>';
strhtml .= '</html>';
echo strhtml;
?>

thanks

Jonny









--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Jonny Nguyen ([address removed]) from Houston PHP Users Group.
To learn more about Jonny Nguyen, visit his/her member profile
To unsubscribe or to update your mailing list settings, click here

Meetup, PO Box 4668 #37895 New York, New York[masked] | [address removed]

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy