Welcome Guest, Not a member yet? Register   Sign In
concat two php variables
#1

[eluser]manash007[/eluser]
I want to concat 2 php variables which will indicate single name.....

EX:
$i=1;
$array.$i[]="something";

which name will be $array1,which is an array........
But this is not working......
How can i do this??????
Anyone can help??????????????
#2

[eluser]davidbehler[/eluser]
What does your array look like? How many entries does it have?
Accessing $i the way you do makes no sense to me, as $i is an integer and no array.

Could you elaborate on what you try to do exactly?
#3

[eluser]Frank Berger[/eluser]
$i=1;
$array = 'array'.$i;
${$array}[]='something';

The manual is your friend:
http://php.net/manual/en/language.variab...riable.php

Cheers
Frank
#4

[eluser]manash007[/eluser]
thanks .......




Theme © iAndrew 2016 - Forum software by © MyBB