Jump to content

dkphp2

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

dkphp2's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. That would be even easier, use substr(): substr($str, 21, 1); // this gives you the 21st character for each line.
  2. [code]<?php     $brokerage = "{listing_field_ListingOfficeID_value}";     if ($brokerage != "999"){         echo "<p>foo</p>";         echo "brokerage=$brokerage";     } else {         echo "<p>my broker</p>";         echo "brokerage=$brokerage";     } ?> [/code] I am trying to get it to work within an Open Realty template and {listing_field_ListingOfficeID_value} is one of the fields you can place on the page within the templating system. It appears to be parsing the PHP, but I can't ever get it to behave like I need it to. I've tried single & double quotes around the $brokerage assignment and comparison in the if statement. I've tried using == to compare instead of !=. Switching the comparison does switch which code is executed, but the statement never evaluates like I need it to. When it echoes the $brokerage variable to the page, it is always correct...but the comparison does not appear to be correct. What I am trying to get it to do is check the ListingOfficeID, and if it is not mine then it will display a logo denoting that it is listed by another broker. Any suggestions for what I am doing wrong?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.