Jump to content

validate either if or switch case


oracle765

Recommended Posts

it kind of depends on if there are or can be other values accross in any set and if there are or can be other values down with 5,...10... or higher?

 

and do you need to validate that the values being tested are only in those sets of values or is just getting the number from the end enough?

 

so I can do

 

switch if $policytypeid = substr($policytypeid, -1); then ??

No, because that is not valid syntax,

 

Mac_gyver code will will return the last character from the string stored in $policytypeid. So if   $policytypeid   is set to   FamilyR2  then   substr($policytypeid, -1);   will return 2.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.