FlyingIsFun1217 Posted July 15, 2006 Share Posted July 15, 2006 Hey,I was wondering, how would a simple html code snippet like this: [code]<a href="aim:GoIM?screenname=myscreenname"><img src="http://api.oscar.aol.com/SOA/key=fl1aQV3Tmy/presence/myscreennameagain" border="0"/></a>[/code]be changed to php code?Thanks for the help!FlyingIsFun1217 Quote Link to comment https://forums.phpfreaks.com/topic/14712-html-php/ Share on other sites More sharing options...
pixy Posted July 15, 2006 Share Posted July 15, 2006 [code]<?phpecho '<a href="aim:GoIM?screenname=myscreenname"><img src="http://api.oscar.aol.com/SOA/key=fl1aQV3Tmy/presence/myscreennameagain" border="0"/></a>';?>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/14712-html-php/#findComment-58685 Share on other sites More sharing options...
FlyingIsFun1217 Posted July 15, 2006 Author Share Posted July 15, 2006 hmmm...That gives me an error...[quote]Parse error: parse error, unexpected T_STRING in C:\Program Files\Abyss Web Server\Hosted Pages & Files\sphpblog-0.4.8\scripts\sb_theme.php on line 37[/quote]I think this might be due to the way that the code that it goes in is set up:[code]$result = array(); $result[ 'title' ] = 'Am I on AIM?'; $result[ 'content' ] = 'content(php code to retireve image) goes here'; return ( $result ); }[/code]If you would like to see what I am kinda trying to change, check out [url=http://www.simplephpblog.com/static.php?page=adding_php_block]this page[/url]Thanks again!FlyingIsFun1217 Quote Link to comment https://forums.phpfreaks.com/topic/14712-html-php/#findComment-58694 Share on other sites More sharing options...
pixy Posted July 15, 2006 Share Posted July 15, 2006 [code]<?phpecho '<a href="aim:GoIM?screenname=myscreenname"><img src="http://api.oscar.aol.com/SOA/key=fl1aQV3Tmy/presence/myscreennameagain" border="0"></a>';?>[/code]There is no unescaped characters in that code above. Quote Link to comment https://forums.phpfreaks.com/topic/14712-html-php/#findComment-58709 Share on other sites More sharing options...
FlyingIsFun1217 Posted July 16, 2006 Author Share Posted July 16, 2006 So would it be set up as so?[code]function menu_aim_presence () { // AIM Presence Block $result = array(); $result[ 'title' ] = 'Am I on AIM?'; $result[ 'content' ] = 'echo '<a href="aim:GoIM?screenname=myscreenname"><img src="http://api.oscar.aol.com/SOA/key=fl1aQV3Tmy/presence/myscreennameagain" border="0"></a>'; return ( $result ); } [/code]If so, I am still getting an error for some reason:[quote]Parse error: parse error, unexpected T_STRING in C:\Program Files\Abyss Web Server\Hosted Pages & Files\sphpblog-0.4.8\scripts\sb_theme.php[/quote]Thanks for helpin a noob...FlyingIsFun1217 Quote Link to comment https://forums.phpfreaks.com/topic/14712-html-php/#findComment-58727 Share on other sites More sharing options...
akitchin Posted July 16, 2006 Share Posted July 16, 2006 remove the "echo '" from that line. echo is to output something to the browser. Quote Link to comment https://forums.phpfreaks.com/topic/14712-html-php/#findComment-58731 Share on other sites More sharing options...
FlyingIsFun1217 Posted July 16, 2006 Author Share Posted July 16, 2006 [quote]echo is to output something to the browser[/quote]Sometimes I think I'm going crazy... Thanks for reminding me!FlyingIsFun1217 Quote Link to comment https://forums.phpfreaks.com/topic/14712-html-php/#findComment-58764 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.