Jump to content

A little code help please


nexissair

Recommended Posts

Hi all

Could someone please help me out, I think the solution is so simple but I just can't see it with limited PHP skills.

Ok I have multiple airlines but my schedules all come under the airline code "NEX" as the other airlines are for charters, code share etc.

so I have filtered my NEX schedules on the results.tpl like so which works a treat:

 <?php
foreach($allroutes as $route)
{
if ($route->code != 'NEX') continue;

But I wanted to show two or more airline codes in the schedule results.tpl like "NEX" and"3XE" but not any others how would I adjust the code?

I've tried a few things but with no success.

Many thanks

Link to comment
Share on other sites

You can have a look at logical operators here is a link that explains it http://php.net/manua...ors.logical.php

in your case now and without me being able to try it out

try

<?php
foreach($allroutes as $route)
{
if ($route->code != 'NEX' || '3XE') continue;

Many thanks, the link is very interesting I will have a good read through the whole thing time permitting, I tried the code you supplied but it didn't work, still only showed the NEX schedules.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...