Welcome Guest, Not a member yet? Register   Sign In
how to mix html and php?
#11

PHP is an embedded language, you can switch between plain HTML code and PHP code without losing readability. PHP code must be separated from HTML using PHP start and end tags in order to be embedded. The PHP tags indicate where the PHP code begins and finishes for the web server.
Reply
#12

I replaced that but it is still not working.
proof that an old dog can learn new tricks
Reply
#13

(This post was last modified: 02-04-2022, 04:10 PM by John_Betong.)

@richb201 ,
> Thanks. It seems phpStorm doesn't like <?php endif ?> So I tried

Code:
<php if ($this->dataStore("cost_center")->get(0,"num_projects")>0 ;?>

I think the syntax has an incorrect semi-colon instead of a period when trying to use PHP alternative syntax:

https://www.php.net/manual/en/control-st...syntax.php
Reply
#14

He's also missing the if statements right )
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#15
Photo 
(This post was last modified: 02-05-2022, 04:11 AM by John_Betong.)

(02-05-2022, 03:08 AM)InsiteFX Wrote: He's also missing the if statements right )

Perhaps he should try setting the following because errors would be thrown which would have to be cleared before trying to run the script. Why wait, best to know immediately there are problems:

Code:
<?php declare (strict_types=1);
error_reporting(-1);
ini_set(‘display_errors’, ‘true’);
Reply




Theme © iAndrew 2016 - Forum software by © MyBB