Page 1 of 1
please help for arranging vars
Posted: Sun Oct 05, 2008 4:54 am
by Sparta
hello mates
funny problem for a newbie but please help:
I have 4 vars and all are numeric, I want to make the 5th var as an arrangement of these and can't do it.
for example:
$a = 111;
$b = 222;
$c = 333;
$d = 444;
I want result to be:
$result = $a.$b.$c.$d but not work, I want the result as the below:
$result = 111222333444;
but any combination I use made them multiple to each other or goes to mathematics commands.
what I must to have the result?
Re: please help for arranging vars
Posted: Sun Oct 05, 2008 5:03 am
by pcoder
What did you get then?

Re: please help for arranging vars
Posted: Sun Oct 05, 2008 6:10 am
by Sparta
I didn't get anything friend
I need help here not lough
help me how arrange $a $b $c $d
that the output would be a string like my sample
$result = 111222333444;
is it work:
$result = {$a}.{$b}.{$c}.{$d}
or anything else
pleaseeeeeeeeeeeee
Best Regards
Sparta
Re: please help for arranging vars
Posted: Sun Oct 05, 2008 6:57 am
by Ziq
How is it possibly
Try this:
Code: Select all
<?
$a = 111;
$b = 222;
$c = 333;
$d = 444;
$result = $a.$b.$c.$d;
echo 'result is '.$result;
?>
What are you geting in output?
Re: please help for arranging vars
Posted: Sun Oct 05, 2008 11:03 am
by Sparta
I don't know why you make joke with me
I said I don't know how to do it if you have any idea please help if not don't make fun here please.
I only said if we have:
$a=111;
$b=222;
$c=333;
$d=444;
how I can have:
$result=111222333444;
I know for you this is really funny but I can't do it and need your help M8s
please help
I just want to set this numeric variables one after another and no action on them just puting one after another no calculation.
Re: please help for arranging vars
Posted: Sun Oct 05, 2008 11:28 am
by 4fit?
Sparta wrote:I don't know why you make joke with me
I said I don't know how to do it if you have any idea please help if not don't make fun here please.
I only said if we have:
$a=111;
$b=222;
$c=333;
$d=444;
how I can have:
$result=111222333444;
I know for you this is really funny but I can't do it and need your help M8s
please help
I just want to set this numeric variables one after another and no action on them just puting one after another no calculation.
Dude, chill a bit. Zig just provided you with the answer with the code below. You can see by
this sample page that it produces exactly what you want.
Code: Select all
<?
$a = 111;
$b = 222;
$c = 333;
$d = 444;
$result = $a.$b.$c.$d;
echo 'result is '.$result;
?>