Please tell me the description of smarty that branches conditions according to the flag set in the URL.

Asked 1 years ago, Updated 1 years ago, 35 views

Thank you for your help.I'm afraid it's rudimentary, but please give me some advice.

The description of conditional branching according to the flag in the URL is as follows in PHP, but could you tell me what the description would be like if a similar case was described in smarty?

if($_GET['id']=='1'){
a;
} else if($_GET['id']=='2'){
b;
} else if($_GET['id']=='3'){
c;

smarty

2022-09-30 19:27

1 Answers

Due to the nature of View, I think PHP should replace the variable and smarty should separate it by looking at it.

If you really want to do it, I think you can embed it with the {php} tag.


2022-09-30 19:27

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.