Forum Moderators: coopster

Message Too Old, No Replies

Accessing PHP variables from within HTML?

         

calmseas

4:21 pm on Aug 20, 2010 (gmt 0)

10+ Year Member



I understand how to access FORM variables from within PHP. However, how does one access PHP variables from within HTML?

RKTexas

5:07 pm on Aug 20, 2010 (gmt 0)

10+ Year Member



if you have stored variables within PHP that you either want to display or access in HTML the easy way is to do this

example:

<?php
$this = Hello World;
?>

<html>
this is what I want to say: {$this};
</html>

output would be
this is what I want to say: Hello World

this is generalized, not sure if this is what you were asking or not.

calmseas

11:52 pm on Aug 21, 2010 (gmt 0)

10+ Year Member



Got it............thank you!