Jump to content


Photo

Html-->PHP...


  • Please log in to reply
6 replies to this topic

#1 FlyingIsFun1217

FlyingIsFun1217
  • Members
  • PipPipPip
  • Advanced Member
  • 178 posts
  • LocationHere

Posted 15 July 2006 - 09:31 PM

Hey,

I was wondering, how would a simple html code snippet like this:

<a href="aim:GoIM?screenname=myscreenname">
<img src="http://api.oscar.aol.com/SOA/key=fl1aQV3Tmy/presence/myscreennameagain" border="0"/></a>

be changed to php code?

Thanks for the help!
FlyingIsFun1217

#2 pixy

pixy
  • Members
  • PipPipPip
  • Advanced Member
  • 295 posts

Posted 15 July 2006 - 09:31 PM

<?php
echo '<a href="aim:GoIM?screenname=myscreenname">
<img src="http://api.oscar.aol.com/SOA/key=fl1aQV3Tmy/presence/myscreennameagain" border="0"/></a>';
?>

This is a .44 Caliber Loveletter straight through my heart.

Tabulas + Threadless + Hire Me!


#3 FlyingIsFun1217

FlyingIsFun1217
  • Members
  • PipPipPip
  • Advanced Member
  • 178 posts
  • LocationHere

Posted 15 July 2006 - 10:02 PM

hmmm...

That gives me an error...

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


I think this might be due to the way that the code that it goes in is set up:
$result = array();
		$result[ 'title' ] = 'Am I on AIM?';
		$result[ 'content' ] = 'content(php code to retireve image) goes here';

		return ( $result );
		}

If you would like to see what I am kinda trying to change, check out this page

Thanks again!
FlyingIsFun1217

#4 pixy

pixy
  • Members
  • PipPipPip
  • Advanced Member
  • 295 posts

Posted 15 July 2006 - 11:00 PM

<?php
echo '<a href="aim:GoIM?screenname=myscreenname">
<img src="http://api.oscar.aol.com/SOA/key=fl1aQV3Tmy/presence/myscreennameagain" border="0"></a>';
?>

There is no unescaped characters in that code above.

This is a .44 Caliber Loveletter straight through my heart.

Tabulas + Threadless + Hire Me!


#5 FlyingIsFun1217

FlyingIsFun1217
  • Members
  • PipPipPip
  • Advanced Member
  • 178 posts
  • LocationHere

Posted 16 July 2006 - 12:03 AM

So would it be set up as so?
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 );
		}
If so, I am still getting an error for some reason:

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


Thanks for helpin a noob...
FlyingIsFun1217

#6 akitchin

akitchin
  • Staff Alumni
  • Advanced Member
  • 2,516 posts
  • LocationCalgary, AB, Canada

Posted 16 July 2006 - 12:20 AM

remove the "echo '" from that line.  echo is to output something to the browser.

#7 FlyingIsFun1217

FlyingIsFun1217
  • Members
  • PipPipPip
  • Advanced Member
  • 178 posts
  • LocationHere

Posted 16 July 2006 - 02:38 AM

echo is to output something to the browser


Sometimes I think I'm going crazy... Thanks for reminding me!
FlyingIsFun1217




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users