<?php

 $test1text = 'chris';
 $test2text = 'ryan';
 $test3text = 'lee';

 $count = 3;

 $tmp = "test". $count ."text";

 echo $$tmp;
?>

your better using arrays if you can though.


--


Chris Lee
Mediawaveonline.com

em. [EMAIL PROTECTED]

ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120


""Brandon Orther"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> Is there a way to use a variable in the middle of a variable?
>
> ## START EXAMPLE ##
>
> <?
>
> $test1text = "";
> $test2text = "";
> $test3text = "";
>
> $count = 3;
>
> $i = 0;
> do{
>
> $test$itext = "$i";
>
> }while($i < $count);
>
> ?>
>
> ## END EXAMPLE ##
>
>
> $test($i)text = "$i";
>       ^^----------------------I want this variable to get bigger while the
> loop is going but I can't figure out how to make the $test#text variable
to
> read it correctly.
>
> I hope someone can understand what I am saying.
>
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> [EMAIL PROTECTED]
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
>
> --
> 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]

Reply via email to