jerastraub Posted November 17, 2006 Share Posted November 17, 2006 Here is my code:[code]<span class="price">$ {$PrintPrice}</span>[/code]The problem I am having is how do I get the $ next to the price without it thinking that the additional $ is part of the variable. Like this:[code]<span class="price">$30</span>[/code] Link to comment https://forums.phpfreaks.com/topic/27595-using-for-price/ Share on other sites More sharing options...
taith Posted November 17, 2006 Share Posted November 17, 2006 [code]$variable = '<span class="price">$'.$PrintPrice.'</span>';[/code] Link to comment https://forums.phpfreaks.com/topic/27595-using-for-price/#findComment-126202 Share on other sites More sharing options...
esukf Posted November 17, 2006 Share Posted November 17, 2006 [code]<?phpecho "<span class=\"price\">\${$PrintPrice}</span>";//orecho '<span class="price">$'.$PrintPrice.'</span>'; //<- preferred//or?><span class="price">$<?php echo $PrintPrice ?></span>[/code] Link to comment https://forums.phpfreaks.com/topic/27595-using-for-price/#findComment-126205 Share on other sites More sharing options...
jerastraub Posted November 18, 2006 Author Share Posted November 18, 2006 Just wanted to say tks, for helping me out with this. I forget that i can just simply use \. Link to comment https://forums.phpfreaks.com/topic/27595-using-for-price/#findComment-126549 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.