Page 1 of 1
2 variable same line
Posted: Tue May 04, 2021 4:27 pm
by Maxidays
Hello, my OP is 2.1
I want to know how have 2 variable in same code :
like upc + price>75
<?php if ($upc) { ?> + <?php if ($price>75) { ?>
Thanks for your help
Michel
Re: 2 variable same line
Posted: Tue May 04, 2021 4:58 pm
by thekrotek
You really should start with reading/watching some PHP tutorials and don't ask basic coding questions on OpenCart forums.
Re: 2 variable same line
Posted: Tue May 04, 2021 7:10 pm
by straightlight
Posted OC version incomplete. StackOverFlow request.
Re: 2 variable same line
Posted: Tue May 04, 2021 7:38 pm
by paulfeakins
Maxidays wrote: ↑Tue May 04, 2021 4:27 pm
<?php if ($upc) { ?> + <?php if ($price>75) { ?>
Code: Select all
<?php
if(isset($upc) && $price > 75) {
?>
Although that doesn't really make any sense so you do need to start with some basics.
I'd recommend
https://www.w3schools.com/php/
Re: 2 variable same line
Posted: Mon Jun 14, 2021 11:59 pm
by Maxidays
Thanks very much
