Page 1 of 1

setting variable to image file (gif) and using it in $out.

Posted: Wed Jan 03, 2007 12:10 pm
by CdnRebel
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi,

They prefer to use variables and I am not sure how to code it.
I have the following:

Code: Select all

var $yearNavForw="bookingAgent/images/rightarrow.gif";

$out.="<img src =\"".$this->yearNavForw."\"width = \"11\" height \"10\"></a></td></tr></table></td></tr>\n";
This doesn't seem to be working. What am I doing wrong?

Thanks,
CdnRebel


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Wed Jan 03, 2007 12:17 pm
by feyd
Can you post more of the code, or explain more?

Is $out in a method of whatever class $yearNavForw was set in?

Posted: Wed Jan 03, 2007 12:24 pm
by Kieran Huggins
Greetings, my rebelious neighbour.

Are you using some sort of class?

setting variable to image file (gif) and using it in $out.

Posted: Wed Jan 03, 2007 12:52 pm
by CdnRebel
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi Everyone,

Thanks, but the problem has been resolved.  See revised version of the code:

Code: Select all

<?php
   echo 	'	
var $yearNavForw="/bookingAgent/images/rightarrow.gif";

$out.="<img src =\"".$this->yearNavForw."\"width = \"11\" height= \"10\"></a></td></tr></table>\n";
'
?>
I hope the syntax is right for your purposes.

I was missing the first / from the link for the file and the '=' from the height and there was an extraneous </td></tr>

Regards,
CdnRebel


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]