Date: 08/31/01
- Next message: Jon Thompson Coon: "[PHP] passing variables between scripts?"
- Previous message: Philip Olson: "Re: [PHP] array search"
- In reply to: Stig-Ørjan Smelror: "[PHP] help with strings..."
- Next in thread: Philip Olson: "Re: [PHP] help with strings..."
- Reply: Philip Olson: "Re: [PHP] help with strings..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
$GLOBALS[substr($string, 0, 1)]
or :
$tmp = substr($string, 0, 1);
${$tmp} = 'add whatever value you want';
----- Original Message -----
From: Stig-Ørjan Smelror <sos <email protected>>
To: <php-general <email protected>>
Sent: Friday, August 31, 2001 9:35 AM
Subject: [PHP] help with strings...
> Hei all.
>
> I've got this string, $string = "test"; and I want to make a $t; out of
> $string.
> Is this possible?
>
> I tried ${substr($string, 0, 1)}, but that didn't work ;)
>
>
> Any help appreciated.
>
>
> TIA.
> --
> Stig-Ørjan Smelror
> Systemutvikler
>
> Linux Communications AS
> Sandakerveien 48b
> Box 1801 - Vika
> N-0123 Oslo, Norway
>
> tel. +47 22 09 28 80
> fax. +47 22 09 28 81
> http://www.lincom.no/
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jon Thompson Coon: "[PHP] passing variables between scripts?"
- Previous message: Philip Olson: "Re: [PHP] array search"
- In reply to: Stig-Ørjan Smelror: "[PHP] help with strings..."
- Next in thread: Philip Olson: "Re: [PHP] help with strings..."
- Reply: Philip Olson: "Re: [PHP] help with strings..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

