trancedm
03-16-2005, 10:46 PM
hey guys im having trouble with echoing chunk of html codes and php function
i have this code so far:
elseif ($r['type'] == php_snippets) {
$script = $r['script'];
echo "
<div class=\"title\">PHP Snippets</div>
<div class=\"splitborder\"> </div>
<p class=\"no-margin\"><strong>Name<span style=\"color: #ff9933;\">:</span></strong> ".$r['name']."<br/>
<strong>Date Added<span style=\"color: #ff9933;\">:</span></strong> ".$r['date']." <br/>
<strong>Description<span style=\"color: #ff9933;\">:</span></strong> <br/>
".$r['description']."</p>
<div class=\"show-code\">Code below...</div>
highlight_string($script)
<div class=\"splitborder\"> </div>";
}
basically i have the function highlight_string($script) where "$script" is a php code, i want to highlight that code ($script) but for some reason its not evaluating it...
here's an example:
http://www.r2xdesign.net/index2.php?page=viewcontent&id=12
i think it has something to do with the way i have html and php function at the same "code"
i hope i make any sense and thanx in advance!
i have this code so far:
elseif ($r['type'] == php_snippets) {
$script = $r['script'];
echo "
<div class=\"title\">PHP Snippets</div>
<div class=\"splitborder\"> </div>
<p class=\"no-margin\"><strong>Name<span style=\"color: #ff9933;\">:</span></strong> ".$r['name']."<br/>
<strong>Date Added<span style=\"color: #ff9933;\">:</span></strong> ".$r['date']." <br/>
<strong>Description<span style=\"color: #ff9933;\">:</span></strong> <br/>
".$r['description']."</p>
<div class=\"show-code\">Code below...</div>
highlight_string($script)
<div class=\"splitborder\"> </div>";
}
basically i have the function highlight_string($script) where "$script" is a php code, i want to highlight that code ($script) but for some reason its not evaluating it...
here's an example:
http://www.r2xdesign.net/index2.php?page=viewcontent&id=12
i think it has something to do with the way i have html and php function at the same "code"
i hope i make any sense and thanx in advance!