Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jan 2012
    Location
    localhost
    Posts
    14
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Little help (T_CONSTANT_ENCAPSED_STRING)

    Hei again. Last question:
    I have:
    if (!isset("1".$image["ID"].".jpg")){ and get:
    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING

    Can someone fix this for me? Thanks. - I already tried all versions (with "", ''), still can't fix.

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,503
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    You can't test to see if a .jpg image is set ...

    You can check to see if the file exists though ...

    if(file_exists("1".$image["ID"].".jpg")){
    echo "Yes, the file exists.";
    }
    else{
    echo "No, it does not exist.";
    }


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •