|
-
Aug 14th, 2004, 01:47 PM
#1
Thread Starter
Hyperactive Member
joining strings [resolved]
Right., how do i join a string and a variable togeather in php?
im trying to join the following and I cant get iot to work
[php]
<? echo '<p><font face="Century Gothic">Thank you. Your reminder has been set for ' <what goes in here to join my variable to the rest?> '$temp1' ;
?>
manythanks
chrisio
got it, its the full stop
Last edited by Chrisio; Aug 14th, 2004 at 03:34 PM.
-
Aug 23rd, 2004, 09:46 AM
#2
Fanatic Member
Or a Period for thoese in n.America the joys of the English language more complex and alot more fun than any computer language.
Useful Links
.Net
#Develop, GhostDoc, CodeKeep , be.PINVOKE, Good Code Snippet Site
Krypton Toolkit, XPCC / XP Common Controls, QSS Windows Forms Components
VB.COM
VB.Classic Help File, MB Controls, MZTools, ADO Stored Procedure Generator add-in,
-
Aug 23rd, 2004, 09:53 AM
#3
Frenzied Member
The correct way is to do this:
PHP Code:
echo "This is a " . $string . ";
-
Aug 23rd, 2004, 04:47 PM
#4
Stuck in the 80s
Originally posted by ober0330
The correct way is to do this:
PHP Code:
echo "This is a " . $string . ";
Yes, that is the correct way to do it if you want a parse error.
-
Aug 24th, 2004, 06:38 AM
#5
Frenzied Member
oops... forgot the end quote. I usually just don't add the dot and the quote at the end if the variable is at the end of the string, but I wanted the OP to see how to include a variable in a string. I was actually going to continue the string, but got lazy.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|