I am trying to generate different page results on a dynamic page depending on whether the page is either Niche 1 or Niche 2 for Insurance Providers (these are review pages and one is Travel (Niche 1) and the other is Pet (Niche 2).
I have created a simple statement and I can get the output to print either statement depending on whether that Insurer is Travel or Pet, so that bit works
<?php
if ($broker_details->Niche_NicheID== '1'){
echo 'THIS IS NICHE 1';
} else {
echo 'THIS IS NOT NICHE 1'
;}
?>
It will print correctly
THIS IS NICHE 1 or THIS IS NOT NICHE 1
But when I try to put the whole page in, the layout is showing a coding error, I am simply cutting and pasting this entire block of code between the ' ' brackets instead of the 'THIS IS NICHE 1'.
The error is right at the start so I must be putting a bracket or apostrophe or something in the wrong place.
This is at the Start of the code I want t insert 
This is at the end of the code I want to insert. 
I've tried putting the code in ' ' and this just turns all the divs to red, can anyone help, how should I enclose the page code correctly.
Thank you
Aucun commentaire:
Enregistrer un commentaire