![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Join Date: Jan 2003
Location: Los Angeles
Posts: 2,680
|
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"> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Jan 2003
Location: San Jose
Posts: 548
|
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:
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: Jan 2003
Location: Los Angeles
Posts: 2,680
|
Thanks. I had everything right except for escaping the quotes. WTF is the hahaha shit?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Confirmed User
Join Date: Aug 2003
Location: Calgary, Alberta
Posts: 6,801
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Feb 2004
Location: If i was up your ass you'd know
Posts: 3,695
|
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"); ?> |
![]() |
![]() ![]() ![]() ![]() ![]() |