RE: [PHP] Add $String to $Num ???

2001-10-03 Thread Maxim Maletsky \(PHPBeginner.com\)


$sess = $String.$Num;
session_register($sess);

 ..is your answer :-)

 ...you're welcome :-)

Maxim Maletsky
www.PHPBeginner.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: giovedi 4 ottobre 2001 2.53
To: [EMAIL PROTECTED]
Subject: [PHP] Add $String to $Num ???


Hi,

I have a variable called $String which can contain 3 random numbers like
so...

$String=12,94,423;

I then have $Num which is a single number from 1 - 20, I want to add
$String 
and $Num together like this

$String$Num

So I would end up with $String1=12,94,423; and then I can enter that
value 
into my session

session_register(String.$Num);

I have tried everyway I can think of but it never works

The reason for doing this is so I can store multiple $Strings in the
session 
and use them later for a search.

Can anyone help?

Thanks
Ade

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] To
contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Add $String to $Num ???

2001-10-03 Thread SilkWebDesign

Hi,

No that doesn't quite work, using your example it returned in my session file

!10,47,552|

If I change session_register($sess); to session_register(sess); it gives me

sess|s:9:10,47,552;

And what I want is

String1(or 2,3,4,5 etc whatever the value of $Num is)|s:9:10,47,552;

Ade

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Add $String to $Num ???

2001-10-03 Thread Alexander Skwar

So sprach »[EMAIL PROTECTED]« am 2001-10-03 um 21:28:03 -0400 :
 String1(or 2,3,4,5 etc whatever the value of $Num is)|s:9:10,47,552;

Try:

session_register(${$string . $num});

And read up on variable variables in the manual.

And maybe forget this idea and use arrays instead...

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:   http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die günstige Art an Linux Distributionen zu kommen
Uptime: 0 hours 40 minutes

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]