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

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.

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

(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

<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:


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 )
(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:

<?php declare (strict_types=1);
ini_set(‘display_errors’, ‘true’);

Theme © iAndrew 2016 - Forum software by © MyBB