Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2015-06-24 01:46:57

gengl
Member
From: Lexington, SC
Registered: 2013-11-24
Posts: 80
Website

Comparison operators in php

When writing a php script into phplugins, comparison operators are giving me fits. I have tried escaping them to no avail. As an example, if I write something such as -


<?php if ($pageNum_Names_Pics > 0) {  ?>       

comparing to see if $pageNum_Names_Pics is greater than zero

the "greater than" comparison closes the "<?php"    bracket before getting to the "{ ?>" portion of the evaluation. Escaping the "greater than" comparison as "\>" does not work either.

Need some help on making comparisons with php within phplugins..........

Offline

#2 2015-06-24 02:21:06

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Comparison operators in php

are you using a plain text editor for this? Because it looks like what you're doing should work fine.
http://php.net/manual/en/language.opera … arison.php


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2015-06-24 02:29:49

Daniel Leu
Moderator
Registered: 2012-10-11
Posts: 1,624
Website

Re: Comparison operators in php

I'm wondering if the variable $pageNum_Names_Pics is visible inside your php function?


Daniel Leu | Photography   
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com

Offline

#4 2015-06-24 02:43:51

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Comparison operators in php

I was wondering if the variable had been declared too. Are you comparing any other variables? Does this happen with everything you're comparing?


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#5 2015-06-24 03:41:10

gengl
Member
From: Lexington, SC
Registered: 2013-11-24
Posts: 80
Website

Re: Comparison operators in php

Playing with a test gallery to try to get things working - using Notepad++

No - doesn't appear that variables were declared - my attempt at placing into the head_end function has all of my php code appearing as comments (at least judging by the color code - green). The php is therefore not running, just being printed into the head and ignored.

Back to the drawing board again........

Thanks for the help. I'll be back later I'm sure.    smile

Offline

Board footer

Powered by FluxBB