Announcement

Collapse
No announcement yet.

array ordinal using a global variable

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • array ordinal using a global variable

    I need to address an array element using a global variable, but it is being passed through to php and php doesn't like it.
    In the example below, [msi] is a global variable and {init_act[]} is field in a row read from the database.
    if ({init_act[[msi]]} == "Login")
    How do I get ScriptCase to recognize the global variable and make the substitution?

    BTW,
    ScriptCase tried to create a new global called [msi

  • #2
    Hi,
    if you used the sc_lookup() macro to get your record, the result is a two dimensional array.
    You should try:

    if({init_act[0][[msi]]} == "Login")

    If SC/PHP still gets confused, stick it in a local variable first. $loc_msi = [msi];

    Hope this helps
    jsb

    Comment

    Working...
    X