Jump to content

PHP HELP


steerpike

Recommended Posts

My site has SHTML includes for the Main Menu.

The include file uses

<!--#if expr="$area = buttonname" -->
<show button up>

<!--#else -->
<show button down>

...in the include file for the main menu to display the selected button of the current page.


I recently added a PHP function to the page and now I need to change the SHTML include to a PHP include.

I found this way to include a file in PHP for the Main menu.

<?php require_once('assets/ssi/mainmenu.php'); ?>

...but I haven't found how to do the <if> <else> part of the SHTML in PHP.


Does anyone know how to do this? Any help would be greatly appreciated.

Thanks!




Link to comment
https://forums.phpfreaks.com/topic/33221-php-help/
Share on other sites

Your question is kinda confusing.. but it depends on what the SHTML if/else is supposed to do, in order to get to work in PHP.

If you could explain more what the if/else in shtml is doing, it would be easier to help you.

[code]<?php

if (??) {

//Show button up

}

else {

//Show button down

}

?>[/code]
Link to comment
https://forums.phpfreaks.com/topic/33221-php-help/#findComment-155149
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.