Announcement

Collapse
No announcement yet.

[SOLVED] Can a PHP Method return a value?

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

  • [SOLVED] Can a PHP Method return a value?

    Can a PHP Method in a Control Application return a value?

    Any example would be appreciated.

  • #2
    You could try to do a little test. Create a function in the php method, i.e. GetValue();
    Add
    return 12;

    Then in an event you call the function

    {myformfield}=GetValue();

    If it shows 12 it works, if not it appearantly isn't possible.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Many thanks Albert. Works fine as standard PHP.

      Comment


      • #4
        Hi Albert, what if I need to display an array of values in a dropdown/list box during page load, how to achieve this?

        Comment


        • #5
          Scriptcase works from tables so a dropdown list would be difficult if you have a php array of data. The approach would be to create a temporary table and use that as a lookup reference.
          Albert Drent
          aducom software netherlands
          scriptcase partner, reseller, support and (turn-key) development
          www.scriptcase.eu / www.scriptcase.nl

          Comment

          Working...
          X