glew
Junior Member
- Feb 10, 2008
- 141
- 95
can someone show me the correct way to turn this into a variable!
this was my last attempt but more errors
i just can't figure out what to and what not to escape anytime I have a complex
expression ie:
it's pissing me off! :banghead: any help would be appreciated!
Code:
<?php $posttags = get_the_tags();
$count=0; if ($posttags)
{ foreach($posttags as $tag)
{ $count++; if (1 == $count)
{ echo $tag->name . ' '; } } } ?>
this was my last attempt but more errors
Code:
$box = '<?php' . $posttags . '= get_the_tags();
' . $count . '=0; if (' . $posttags . ')
{ foreach(' . $posttags . 'as ' . $tag)
{ $count++; if (1 == $count)
{ echo $tag->name . '"\' \'; } } } ?>'
i just can't figure out what to and what not to escape anytime I have a complex
expression ie:
Code:
$box = <?php bloginfo(template_url) . /images/blank.jpg; ?>
it's pissing me off! :banghead: any help would be appreciated!