Row Rendered event - FIND AS LIKE

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
pelurusilver
User
Posts: 45

Row Rendered event - FIND AS LIKE

Post by pelurusilver »

// Row Rendered event
function Row_Rendered()
{
if
($this->LN_NO->CurrentValue == "-NULL-" )
{$this->RowAttrs["style"] = "background-color: #FFFFFF;color:#FF0000;";}
else if
($this->LN_NO->CurrentValue == "NEWLOAN" )
{$this->RowAttrs["style"] = "background-color: #FFFFFF;color:#EB0CD7;";}
else if
($this->LN_NO->CurrentValue LIKE "%TOTAL" )
{$this->RowAttrs["style"] = "background-color: #FFFFFF;color:#color; font-weight: bold ;";}
else
{$this->Balance->CellAttrs["style"] = "background-color: #FFFFFF; color:#FFFFFF;";}

}

this is my script and run well. But I want to find as LIKE instead of equal string
How to change as I do
($this->LN_NO->CurrentValue LIKE "%TOTAL" )
and its not reflected.


arbei
User
Posts: 9286

Post by arbei »

You may check the CurrentValue by PHP function str_contains() (PHP >= 8).


pelurusilver
User
Posts: 45

Post by pelurusilver »

Am using php 7.5.26.
Lots of s.procedure using the existing languange.
If i am changing to php 8, does all that need to be changed?
Else, if maintaining that version also very easy for my development.


arbei
User
Posts: 9286

Post by arbei »

You should try to upgrade, you cannot stay at PHP 7 forever. (There is no PHP 7.5, and PHP 7.4 has already reached its end of life, see Supported Versions.


pelurusilver
User
Posts: 45

Post by pelurusilver »

Do in need to change any script added in phpmaker?


arbei
User
Posts: 9286

Post by arbei »

You may read PHP official docs on Migrating from PHP 7.4.x to PHP 8.0.x.


Post Reply