Results 1 to 2 of 2
add code for font size under php echo code Forum: PHP ForumReplies: 0
05-30-2009, 12:20 PM #1
I have php script and it uses echo to print any thing out
well my script prints out some link
Please Help Me
if you don't understand please tell me I can try to explain better
06-01-2009, 10:45 AM #2
I could be completely misunderstanding you, because I don't really understand why you would be having a problem doing this.
Just use a normal php echo statement, and make sure you escape any apostrophes that php would interpret as an end to the echo.
Escape them by preceding them with a backslash. Example:
<?php echo '<a href=\'somelink\'>sometext</a>'; ?>
If you're having trouble including your script and the php $link variable, you just need to use a "period" (we call them full stops where I'm from) to concatenate the strings with the variable. Example:
<?php echo 'sometext'.$link.'somemoretext'; ?>
Alternatively, assuming you are building a webpage from a .php file. You could simply exit the php for a while, write your script, and then enter php again to echo the link. Like so:
<?php you are in php here, so close by doing this: ?> Insert your script as you normally would here, and then enter php again to echo the link, like this: <?php echo $link; //then you can exit php like this: ?> then close all your tags and finish your script here, and you can enter php again like this: <?php ...