GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Simple PHP question (https://gfy.com/showthread.php?t=388626)

dodger21 11-14-2004 08:57 PM

Simple PHP question
 
How do I assign this html string to a php variable and then how do I call that variable in my html?

This is the string I want to assign to a php variable

<a href="somelink.htm" onMouseOver="window.status='blahblahblah';return true" onMouseOut="window.status='';return true">

phpslave 11-14-2004 09:03 PM

the message board will problem take this and fuck it up with hahahaha or somebullshit, but here;

$str = "<a href=\"somelink.htm\" onMouseOver=\"window.status='blahblahblah';return true\" onMouseOut=\"window.status='';return true\">";
?>

<!-- then in your html -->

<?=$str?>

<!-- or -->
<?
print $str;
?>

there are many ways to do it

PHP Code:

$str = "<a href=\"somelink.htm\" onMouseOver=\"window.status='blahblahblah';return true\" onMouseOut=\"window.status='';return true\">";
?>

<!-- then in your html -->

<?=$str?>

<!-- or -->
<?
print $str;
?>


dodger21 11-14-2004 09:06 PM

Thanks. I had everything right except for escaping the quotes. WTF is the hahaha shit?

stev0 11-14-2004 09:11 PM

Quote:

Originally posted by dodger21
Thanks. I had everything right except for escaping the quotes. WTF is the hahaha shit?
That's the board censoring words

Doc911 11-14-2004 09:20 PM

If you don't like all the escaping you can save the data in a txt file and do

<?
$string = "file.txt";
file_get_contents($string);
print ("$string");
?>


All times are GMT -7. The time now is 05:35 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123