|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
join php string variables ???
Hi, could someone please tell me how I can join two php string variables?! Here's my code:
PHP Code:
??? THANKS! |
|
#2
|
|||
|
|||
|
hi... if i understand u right, u wanna ei. store a new wariable, that has several of the strings u printet above in it... ?! if that is so, then you can do it like this:
PHP Code:
this should merge the two strings. - Pheifel |
|
#3
|
|||
|
|||
|
i.e http://www.msn.net/mrigesh.php?child_name1=Mrigesh the great&
actual code $i=1; $child_name.$i =$_GET['child_name'.$i] echo $child_name.$i; will print:Mrigesh the great; If this doesn't help, somethin's wrong with your head not the code. And by the way the above two posts doesn't work, don't even try those. Mrigesh Rajbhandari, Php Administrator "glory of God is intelligence" |
|
#4
|
||||
|
||||
|
mrigesh: there was no need to report Pheifel's post, just because it doesn't work. When you report a post, it says:
Note: This is ONLY to be used to report spam, advertising messages, and problematic (harassment, fighting, or rude) posts. His post is none of these. Anyway, your code doesn't work straight away - it is missing a semi-colon from the end of the second line. Quote:
That was nice and modest of you. |
|
#5
|
|||
|
|||
|
Lol
I wa reportet... Giggles. Thats funny. Taken into comparison, that i have helped more. And are more actice than you (mrigesh)
On the other hand. That post is in the sence precisly why the repport-function is there. ![]() - Pheifel |
|
#6
|
|||
|
|||
|
actually, i am not entirely sure that you can do this: $child_name.$i. i haven't tried it myself, but it might work. if it doesn't, i would recommend using arrays.
This would do pretty much the same: PHP Code:
__________________
Benjamin Horsleben horsleben.com/benjamin Don't blame malice for what stupidity can explain |
|
#7
|
|||
|
|||
|
This works - try it yourself and see:
<? $text1 = 'Some'; $text2 = ' Text'; $text3 = $text1 . $text2; echo $text3; ?> This will print "Some Text" -- but notice the space at the front of $text2. You could just have easily put a $spacetext in there for a space. <shrugs> You could also use it to, say, add a tab space in front of your text, and even use with your "post" tag, such as: <? $text1 = ' '; $text2 = ($_POST['textboxdata']); $text3 = $text1 . $text2; echo $text3; ?> This would produce something like: (five spaces here)This is the contents of the textbox! Cheers, Sintrigue |
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > join php string variables ??? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|