#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    14
    Rep Power
    0
    Hi I'm trying to print out the values for the following variables, $day1, $day2, $day3, $day4, and $day5. So if you choose two, then I will show you the value to $day1 and $day2 etc..

    Right now I'm trying to this

    echo $day$i;
    , where i=1,2,3,4,5 in my while loop.

    I get a parse error.
    I've also tried

    echo ("$dow$i");

    among many other combos, any ideas.

    How do I get it to echo $day(1,2,3,4 or 5)

    Thanks

    Mike
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    36
    Rep Power
    15
    try this:

    echo ("$dow[$i]");
    ...or
    echo ("$dow${i}");

    the first should work.

    ------------------
    -Gabe
    "Save trees, eat beaver."
    "y!php3++?"

Similar Threads

  1. Simple question regarding string evaluation
    By Lobsang in forum PHP Development
    Replies: 3
    Last Post: February 3rd, 2004, 02:28 PM
  2. Just a simple question!
    By Il Capitano in forum Perl Programming
    Replies: 1
    Last Post: January 23rd, 2004, 05:00 PM
  3. Replies: 3
    Last Post: January 7th, 2004, 04:23 PM
  4. Replies: 1
    Last Post: January 7th, 2004, 01:39 AM
  5. simple "mod_rewrite" question
    By ilikeitraw in forum Apache Development
    Replies: 6
    Last Post: January 3rd, 2004, 11:35 AM

IMN logo majestic logo threadwatch logo seochat tools logo