Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Location
    UPstate NY
    Posts
    440
    Plugin Contributions
    0

    help question What is wrong with this one line of code??

    My php editor claims there's an error in the area of the = sign next to pixel_trans.gif -- can anyone tell me what might be wrong with this line of code?? The editor says: 'Expression is not assignable: Infix expression"

    Code:
        if (!$categories->fields['categories_image']) !$categories->fields['categories_image'] = 'pixel_trans.gif';
    Thank you, Tom

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: What is wrong with this one line of code??

    It looks like you've got a stray ! in front of the assignment statement, try the following instead:
    Code:
     if (!$categories->fields['categories_image']) $categories->fields['categories_image'] = 'pixel_trans.gif';

 

 

Similar Threads

  1. What is wrong with my form code? (Error)
    By sophie666 in forum General Questions
    Replies: 5
    Last Post: 13 Feb 2012, 11:38 PM
  2. v150 What's wrong with this code...
    By Coins2012 in forum Addon Templates
    Replies: 7
    Last Post: 3 Feb 2012, 03:13 PM
  3. HELP... what's wrong with my tags in this code?
    By limelites in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 24 Apr 2009, 10:51 AM
  4. What is wrong with my code?
    By mikenandrea in forum General Questions
    Replies: 4
    Last Post: 9 Jan 2008, 01:46 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR