![]() |
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"> |
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:
|
Thanks. I had everything right except for escaping the quotes. WTF is the hahaha shit?
|
Quote:
|
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